Skip to content
Permalink
Browse files

Use absolute URLs #26

  • Loading branch information
koirand committed Mar 27, 2019
1 parent e9e49d5 commit acf8d53cdd1d1f5d4a83863e7ca9751df28b7c5b
@@ -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>

This file was deleted.

@@ -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="}}

0 comments on commit acf8d53

Please sign in to comment.
You can’t perform that action at this time.