better indexing and classifier

This commit is contained in:
ston1th 2019-05-03 00:05:51 +02:00
commit 98b53d3a33
9 changed files with 168 additions and 32 deletions

View file

@ -365,7 +365,7 @@ const (
</div>
</div>
<div class="row mt-3">
<div class="col-xs-6">
<div class="col">
<form class="form-horizontal" action="/search" method="post">
<input type="hidden" name="token" value="{{.Token}}">
<div class="form-group">
@ -380,16 +380,31 @@ const (
</div>
</div>
<div class="row mt-3">
<div class="col">
{{if .Data}}
{{range $item := .Data}}
{{if .Data}}
<table class="table table-stripped table-hover">
<thead>
<tr>
<th>File</th>
<th>Keyword</th>
</tr>
</thead>
<tbody>
{{range $item := .Data}}
<tr>
<td>
<a class="mono" href="{{$item.Path}}"><b>{{$item.Path}}</b></a>
<pre class="wrap">{{$item.HTML}}</pre><br>
{{if $item.HTML}}
<br><pre class="wrap">{{$item.HTML}}</pre>
{{end}}
{{else}}
<b>No search results found.</b>
{{end}}
</div>
</td>
<td>{{if $item.Keyword}}<span class="badge badge-primary">{{$item.Keyword}}</span>{{end}}</td>
</tr>
{{end}}
{{else}}
<b>No search results found.</b>
{{end}}
</tbody>
</table>
</div>
{{end}}`
upload = `{{define "body"}}