reformatting html

This commit is contained in:
partisan 2024-04-08 13:15:23 +02:00
parent 6fe3685f92
commit 79660f803d
7 changed files with 96 additions and 35 deletions

View file

@ -131,19 +131,23 @@ func handleImageSearch(w http.ResponseWriter, query, safe, lang string, page int
}
data := struct {
Results []ImageSearchResult
Query string
Page int
Fetched string
HasPrevPage bool
HasNextPage bool
Results []ImageSearchResult
Query string
Page int
Fetched string
LanguageOptions []LanguageOption
CurrentLang string
HasPrevPage bool
HasNextPage bool
}{
Results: results,
Query: query,
Page: page,
Fetched: fmt.Sprintf("%.2f seconds", time.Since(time.Now()).Seconds()),
HasPrevPage: page > 1,
HasNextPage: len(results) >= 50,
Results: results,
Query: query,
Page: page,
Fetched: fmt.Sprintf("%.2f seconds", time.Since(time.Now()).Seconds()),
LanguageOptions: languageOptions,
CurrentLang: lang,
HasPrevPage: page > 1,
HasNextPage: len(results) >= 50,
}
err = tmpl.Execute(w, data)