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