diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/results.gtpl | 6 | ||||
| -rw-r--r-- | templates/search.gtpl | 4 | ||||
| -rw-r--r-- | templates/search_results.html | 14 | 
3 files changed, 15 insertions, 9 deletions
| diff --git a/templates/results.gtpl b/templates/results.gtpl index 151a7d3..ce2b99d 100644 --- a/templates/results.gtpl +++ b/templates/results.gtpl @@ -28,9 +28,11 @@      </tr>      {{ end }}      </table> +    {{if .ShowPrev }} +    <a href="/classic/search?query={{.OriginalQuery.Query}}&page={{.PrevPage}}&maxHits={{.MaxResults}}"> <p>Previous Page</p></a> +    {{ end }}      {{ if .MoreResults }} -    <a href="/classic/search?query={{.OriginalQuery.Query}}&offset={{.LastOffset}}"> <p>Previous Page</p></a> -    <a href="/classic/search?query={{.OriginalQuery.Query}}&offset={{.Offset}}"> <p>Next Page</p></a> +    <a href="/classic/search?query={{.OriginalQuery.Query}}&page={{.PrevPage}}&maxHits={{.MaxResults}}"> <p>Next Page</p></a>      {{ end }}  </body>  </html>
\ No newline at end of file diff --git a/templates/search.gtpl b/templates/search.gtpl index b892f19..841b068 100644 --- a/templates/search.gtpl +++ b/templates/search.gtpl @@ -1,9 +1,9 @@  <!DOCTYPE html>  <html>  <body> -    <h1>{{.GlobalVars.Name}}</h1> +    <h1>{{.GlobalVars.Name}} - Classic Mode</h1>      <form action="/classic/search" method="GET"> -        <input type="text" name="query" value="{{.OriginalQuery.Query}}" placeholder="Search Query" spellcheck="false"> +        <input type="text" name="query" placeholder="Search Query" spellcheck="false">          <input type="submit">      </form>  </body> diff --git a/templates/search_results.html b/templates/search_results.html index 4c053ab..4e9b9a4 100644 --- a/templates/search_results.html +++ b/templates/search_results.html @@ -73,25 +73,28 @@          {{ end }}  </section> -    {{ if .MoreResults }} +          <section class="section">          <div class="container">              <div class="columns"> +              {{if .ShowPrev }}                  <div class="column">                      <div class="field has-addons"> -            <button class="button is-primary is-light is-medium is-fullwidth" href="/search?query={{.OriginalQuery.Query}}&offset={{.LastOffset}}" title="Previous Page"> +            <a class="button is-primary is-light is-medium is-fullwidth" href="/search?query={{.OriginalQuery.Query}}&page={{.PrevPage}}&maxHits={{.MaxResults}}" title="Previous Page">                  <span class="icon is-small">                      <i class="fa-solid fa-left-long"></i>                    </span>                  <span>Previous Page</span> -                </button> +                </a>                      </div>              </div> +            {{ end }} +            {{ if .MoreResults }}                <div class="column">                  <div class="field has-addons"> -            <a class="button is-primary is-medium is-fullwidth" href="/search?query={{.OriginalQuery.Query}}&offset={{.Offset}}" title="Next Page"> +            <a class="button is-primary is-medium is-fullwidth" href="/search?query={{.OriginalQuery.Query}}&page={{.NextPage}}&maxHits={{.MaxResults}}" title="Next Page">                  <span>                    Next Page                  </span> @@ -100,10 +103,11 @@                    </span>                </a></div>              </div> +            {{ end }}          </div></div>          </section> -    {{ end }} +          <script>        if (typeof navigator.serviceWorker !== 'undefined') {          navigator.serviceWorker.register('/static/pwabuilder-sw.js') | 
