mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-20 23:46:28 -05:00
Use absolute URLs #26
This commit is contained in:
parent
e9e49d53d1
commit
acf8d53cdd
10 changed files with 11 additions and 14 deletions
|
@ -66,7 +66,6 @@ const initLunr = () => {
|
|||
$.getJSON('index.json').done((index) => {
|
||||
pagesIndex = index
|
||||
lunrIndex = lunr(builder => {
|
||||
console.log(builder)
|
||||
builder.tokenizer = bigramTokeniser
|
||||
builder.pipeline.reset()
|
||||
builder.ref('ref')
|
||||
|
@ -114,10 +113,10 @@ const initUI = () => {
|
|||
|
||||
// Icon switching
|
||||
if (query.length) {
|
||||
$('#searchBoxIcon').attr('src', '/img/clear.png')
|
||||
$('#searchBoxIcon').attr('src', '../img/clear.png')
|
||||
$('#searchBoxIcon').css('cursor', 'pointer')
|
||||
} else {
|
||||
$('#searchBoxIcon').attr('src', '/img/search.png')
|
||||
$('#searchBoxIcon').attr('src', '../img/search.png')
|
||||
$('#searchBoxIcon').css('cursor', 'default')
|
||||
}
|
||||
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
// Write your custom scripts here.
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="main">
|
||||
<div>
|
||||
<h1>404 page not found.</h1>
|
||||
<p><a href="/">Go Home</a></p>
|
||||
<p><a href="{{ .Site.BaseURL }}">Go Home</a></p>
|
||||
</div>
|
||||
</div>
|
||||
{{ partial "footer.html" . }}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<!-- search box -->
|
||||
<div id="searchBox">
|
||||
<input type="text" id="searchBoxInput" placeholder="Search..." />
|
||||
<img id="searchBoxIcon" src="/img/search.png" />
|
||||
<img id="searchBoxIcon" src="{{ .Site.BaseURL }}/img/search.png" />
|
||||
</div>
|
||||
<!-- search results -->
|
||||
<div id="searchResults"></div>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<header>
|
||||
<!-- avator -->
|
||||
<div class="avatar">
|
||||
<img class="avatarMask" src="/img/{{ .Site.Params.avatar }}">
|
||||
<a href="/"><img src="/img/avatar-border.svg"></a>
|
||||
<img class="avatarMask" src="{{ .Site.BaseURL }}/img/{{ .Site.Params.avatar }}">
|
||||
<a href="{{ .Site.BaseURL }}"><img src="{{ .Site.BaseURL }}/img/avatar-border.svg" }}></a>
|
||||
</div>
|
||||
<!-- author -->
|
||||
<h2><a class="author" href="/">{{ .Site.Params.Author }}</a></h2>
|
||||
<h2><a class="author" href="{{ .Site.BaseURL }}">{{ .Site.Params.Author }}</a></h2>
|
||||
</header>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{"Target":"bundle.min.18eea34e889772359b7798985c476ce1889946fb8933ef10b6f9aafb9911eb16.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-GO6jToiXcjWbd5iYXEds4YiZRvuJM+8Qtvmq+5kR6xY="}}
|
|
@ -671,8 +671,7 @@ const tokens=[]
|
|||
for(let i=0;i<=str.length-2;i++){tokens.push(str.slice(i,i+2))}
|
||||
return tokens.join(' ')}
|
||||
const initLunr=()=>{$.getJSON('index.json').done((index)=>{pagesIndex=index
|
||||
lunrIndex=lunr(builder=>{console.log(builder)
|
||||
builder.tokenizer=bigramTokeniser
|
||||
lunrIndex=lunr(builder=>{builder.tokenizer=bigramTokeniser
|
||||
builder.pipeline.reset()
|
||||
builder.ref('ref')
|
||||
builder.field('title',{boost:10})
|
||||
|
@ -686,8 +685,8 @@ const initUI=()=>{$('#searchBoxIcon').click(()=>{$('#searchBoxInput').val('')
|
|||
$('#searchBoxInput').trigger('keyup')})
|
||||
$('#searchBoxInput').keyup(event=>{const $searchResults=$('#searchResults')
|
||||
const query=$(event.currentTarget).val()
|
||||
if(query.length){$('#searchBoxIcon').attr('src','/img/clear.png')
|
||||
$('#searchBoxIcon').css('cursor','pointer')}else{$('#searchBoxIcon').attr('src','/img/search.png')
|
||||
if(query.length){$('#searchBoxIcon').attr('src','../img/clear.png')
|
||||
$('#searchBoxIcon').css('cursor','pointer')}else{$('#searchBoxIcon').attr('src','../img/search.png')
|
||||
$('#searchBoxIcon').css('cursor','default')}
|
||||
if(query.length<2){$searchResults.hide()
|
||||
return}
|
|
@ -0,0 +1 @@
|
|||
{"Target":"bundle.min.87ff415004641d66f3d4fb9cbf76ce073ce8a10dd5b67afca5054b00be4ebc9a.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-h/9BUARkHWbz1Pucv3bOBzzooQ3Vtnr8pQVLAL5OvJo="}}
|
Loading…
Reference in a new issue