modified head
This commit is contained in:
parent
6834f26b12
commit
94d0294ef6
2 changed files with 45 additions and 45 deletions
|
@ -1,49 +1,49 @@
|
|||
{{ "<!-- banner -->" | safeHTML }}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 text-center mx-auto">
|
||||
<h1 class="text-white mb-3">{{ .Site.Params.banner.title }}</h1>
|
||||
<p class="text-white mb-4">{{ .Site.Params.banner.description }}</p>
|
||||
<div class="position-relative">
|
||||
<input id="search" class="form-control" placeholder="{{ .Site.Params.banner.placeholder }}">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 text-center mx-auto">
|
||||
<h1 class="text-white mb-3">{{ .Site.Params.banner.title }}</h1>
|
||||
<p class="text-white mb-4">{{ .Site.Params.banner.description }}</p>
|
||||
<div class="position-relative">
|
||||
<input id="search" class="form-control" placeholder="{{ .Site.Params.banner.placeholder }}">
|
||||
|
||||
<!-- Javascript -->
|
||||
{{ $currentNode := . }}
|
||||
{{ $currentNode.Scratch.Set "pages" .Site.Pages }}
|
||||
{{ $pages := ($currentNode.Scratch.Get "pages") }}
|
||||
<script>
|
||||
$(function() {
|
||||
var projects = [
|
||||
{{ range $pages }}
|
||||
{
|
||||
value: "{{ .Title }}",
|
||||
label: "{{ .Title }}",
|
||||
url:"{{ .Permalink }}"
|
||||
},
|
||||
{{ end }}
|
||||
];
|
||||
$( "#search" ).autocomplete({
|
||||
minLength: 0,
|
||||
source: projects,
|
||||
focus: function( event, ui ) {
|
||||
$( "#search" ).val( ui.item.label );
|
||||
return false;
|
||||
},
|
||||
select: function( event, ui ) {
|
||||
$( "#search" ).val( ui.item.label );
|
||||
$( "#project-id" ).val( ui.item.value );
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.data( "ui-autocomplete" )._renderItem = function( ul, item ) {
|
||||
return $( "<li>" )
|
||||
.append( "<a href=" + item.url + " + \" "\" + >" + item.label + "</a>" )
|
||||
.appendTo( ul );
|
||||
};
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Javascript -->
|
||||
{{ $currentNode := . }}
|
||||
{{ $currentNode.Scratch.Set "pages" .Site.Pages }}
|
||||
{{ $pages := ($currentNode.Scratch.Get "pages") }}
|
||||
<script>
|
||||
$(function() {
|
||||
var projects = [
|
||||
{{ range $pages }}
|
||||
{
|
||||
value: "{{ .Title }}",
|
||||
label: "{{ .Title }}",
|
||||
url:"{{ .Permalink }}"
|
||||
},
|
||||
{{ end }}
|
||||
];
|
||||
$( "#search" ).autocomplete({
|
||||
minLength: 0,
|
||||
source: projects,
|
||||
focus: function( event, ui ) {
|
||||
$( "#search" ).val( ui.item.label );
|
||||
return false;
|
||||
},
|
||||
select: function( event, ui ) {
|
||||
$( "#search" ).val( ui.item.label );
|
||||
$( "#project-id" ).val( ui.item.value );
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.data( "ui-autocomplete" )._renderItem = function( ul, item ) {
|
||||
return $( "<li>" )
|
||||
.append( "<a href=" + item.url + " + \" "\" + >" + item.label + "</a>" )
|
||||
.appendTo( ul );
|
||||
};
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ "<!-- /banner -->" | safeHTML }}
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
{{ "<!-- Main Stylesheet -->" | safeHTML }}
|
||||
{{ $styles := resources.Get "css/style.css" | minify}}
|
||||
<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">
|
||||
<link rel="stylesheet" href="{{ $styles.Permalink }}" media="screen">
|
||||
|
||||
{{ "<!-- jquiry -->" | safeHTML }}
|
||||
<script src="{{ .Site.BaseURL }}plugins/jquery/jquery-1.12.4.js"></script>
|
||||
|
|
Loading…
Reference in a new issue