86 lines
3.4 KiB
Go
86 lines
3.4 KiB
Go
// Code generated by himesan; DO NOT EDIT.
|
|
// himesan:compiler 0.1.0-dev
|
|
// himesan:runtime-abi sando.v1
|
|
// himesan:source-sha256 c5b402971618747c906c84508d5af9fd00aa33391b9b59f093b001a3cb0b2164
|
|
|
|
package views
|
|
|
|
import (
|
|
__himesan_context "context"
|
|
__himesan_sando "gamertan.com/sandwich-hime/sando"
|
|
__himesan_io "io"
|
|
)
|
|
|
|
var _ = __himesan_sando.ABI
|
|
|
|
func BrowseResults(view BrowseView) __himesan_sando.Component {
|
|
return __himesan_sando.ComponentFunc(func(__himesan_render_context __himesan_context.Context, __himesan_writer __himesan_io.Writer) error {
|
|
_ = __himesan_render_context
|
|
//line views/browse_results.sando:5:3
|
|
if __himesan_error := __himesan_sando.WriteString(__himesan_writer, "\n"); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line views/browse_results.sando:6:37
|
|
if __himesan_error := __himesan_sando.WriteString(__himesan_writer, "\n<section aria-label=\"Browse results\" data-query=\""); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line views/browse_results.sando:7:54
|
|
if __himesan_error := __himesan_sando.WriteAttr(__himesan_writer, (view.Query)); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line views/browse_results.sando:7:67
|
|
if __himesan_error := __himesan_sando.WriteString(__himesan_writer, "\">\n <ul>\n "); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line views/browse_results.sando:9:6
|
|
for _, record := range view.Records {
|
|
//line views/browse_results.sando:9:46
|
|
if __himesan_error := __himesan_sando.WriteString(__himesan_writer, "\n <li>\n <a href=\""); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line views/browse_results.sando:11:20
|
|
if __himesan_error := __himesan_sando.WriteURL(__himesan_writer, (record.URL)); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line views/browse_results.sando:11:33
|
|
if __himesan_error := __himesan_sando.WriteString(__himesan_writer, "\">"); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line views/browse_results.sando:11:39
|
|
if __himesan_error := __himesan_sando.WriteText(__himesan_writer, (record.Title)); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line views/browse_results.sando:11:54
|
|
if __himesan_error := __himesan_sando.WriteString(__himesan_writer, "</a>\n <span class=\"kind\">"); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line views/browse_results.sando:12:30
|
|
if __himesan_error := __himesan_sando.WriteText(__himesan_writer, (record.Kind)); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line views/browse_results.sando:12:44
|
|
if __himesan_error := __himesan_sando.WriteString(__himesan_writer, "</span>\n "); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line views/browse_results.sando:13:10
|
|
if record.Featured {
|
|
//line views/browse_results.sando:13:37
|
|
if __himesan_error := __himesan_sando.Render(__himesan_render_context, __himesan_writer, (Badge("featured"))); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line views/browse_results.sando:13:60
|
|
}
|
|
//line views/browse_results.sando:13:64
|
|
if __himesan_error := __himesan_sando.WriteString(__himesan_writer, "\n </li>\n "); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line views/browse_results.sando:15:6
|
|
}
|
|
//line views/browse_results.sando:15:10
|
|
if __himesan_error := __himesan_sando.WriteString(__himesan_writer, "\n </ul>\n</section>\n"); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
return nil
|
|
})
|
|
}
|