reformatting html
This commit is contained in:
parent
6fe3685f92
commit
79660f803d
7 changed files with 96 additions and 35 deletions
28
images.go
28
images.go
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue