70 lines
5.1 KiB
Go
Generated
70 lines
5.1 KiB
Go
Generated
// Code generated by himesan; DO NOT EDIT.
|
|
// himesan:compiler 0.1.0-dev
|
|
// himesan:runtime-abi sando.v1
|
|
// himesan:source-sha256 e56b373194349ae32dcbad4a26c1d1a3d133e335ff916cef064e12ca2901adf3
|
|
|
|
package views
|
|
|
|
import (
|
|
__himesan_context "context"
|
|
__himesan_sando "gamertan.com/sandwich-hime/sando"
|
|
__himesan_io "io"
|
|
)
|
|
|
|
var _ = __himesan_sando.ABI
|
|
|
|
func Layout(view LayoutView) __himesan_sando.Component {
|
|
return __himesan_sando.ComponentFunc(func(__himesan_render_context __himesan_context.Context, __himesan_writer __himesan_io.Writer) error {
|
|
_ = __himesan_render_context
|
|
//line internal/views/layout.sando:5:3
|
|
if __himesan_error := __himesan_sando.WriteString(__himesan_writer, "\n"); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line internal/views/layout.sando:6:37
|
|
if __himesan_error := __himesan_sando.WriteString(__himesan_writer, "\n<!doctype html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <meta name=\"description\" content=\"A tiny dynamic Go website built with Sandwich Hime.\">\n <title>"); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line internal/views/layout.sando:13:14
|
|
if __himesan_error := __himesan_sando.WriteRCDATA(__himesan_writer, (view.Title)); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line internal/views/layout.sando:13:27
|
|
if __himesan_error := __himesan_sando.WriteString(__himesan_writer, "</title>\n <style>\n :root { color-scheme: light dark; font-family: ui-rounded, system-ui, sans-serif; line-height: 1.6; }\n * { box-sizing: border-box; }\n body { margin: 0; background: #f6f1e7; color: #28231d; }\n a { color: #74449a; text-underline-offset: .2em; }\n a:focus-visible { outline: .2rem solid #c85278; outline-offset: .2rem; }\n .skip { position: absolute; left: .75rem; top: -5rem; padding: .6rem .8rem; background: #fff; color: #28231d; z-index: 2; }\n .skip:focus { top: .75rem; }\n .page, footer { width: min(68rem, calc(100% - 2rem)); margin-inline: auto; }\n .page { padding-block: clamp(3rem, 9vw, 7rem); }\n .eyebrow { margin: 0 0 1rem; }\n .badge { display: inline-block; padding: .25rem .65rem; border: 1px solid currentColor; border-radius: 999px; font-size: .84rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }\n h1 { max-width: 16ch; margin: 0; font-size: clamp(2.5rem, 9vw, 5.8rem); line-height: .98; overflow-wrap: anywhere; }\n h2 { margin-top: 3.5rem; font-size: clamp(1.6rem, 4vw, 2.4rem); }\n h3 { margin-top: 0; }\n .lede { max-width: 46rem; font-size: clamp(1.1rem, 2vw, 1.35rem); }\n .trail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }\n .trail, .note { padding: 1.1rem; border: 1px solid #cdbfae; border-radius: .8rem; background: #fffaf1; }\n .trail p { margin-bottom: 0; }\n .note { max-width: 52rem; margin-top: 2rem; }\n footer { padding-block: 1.5rem 2.5rem; border-top: 1px solid #cdbfae; font-size: .9rem; }\n footer p { margin: .25rem 0; }\n code { overflow-wrap: anywhere; }\n @media (prefers-color-scheme: dark) {\n body { background: #1d1a20; color: #f5eee5; }\n a { color: #d9a5ff; }\n .trail, .note { border-color: #5b505f; background: #29242d; }\n footer { border-color: #5b505f; }\n }\n </style>\n</head>\n<body>\n <a class=\"skip\" href=\"#main\">Skip to content</a>\n "); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line internal/views/layout.sando:47:7
|
|
if __himesan_error := __himesan_sando.Render(__himesan_render_context, __himesan_writer, (view.Body)); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line internal/views/layout.sando:47:19
|
|
if __himesan_error := __himesan_sando.WriteString(__himesan_writer, "\n <footer>\n <p>Rendered at <time datetime=\""); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line internal/views/layout.sando:49:40
|
|
if __himesan_error := __himesan_sando.WriteAttr(__himesan_writer, (view.RenderedAtUTC)); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line internal/views/layout.sando:49:61
|
|
if __himesan_error := __himesan_sando.WriteString(__himesan_writer, "\">"); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line internal/views/layout.sando:49:67
|
|
if __himesan_error := __himesan_sando.WriteText(__himesan_writer, (view.RenderedAtUTC)); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line internal/views/layout.sando:49:88
|
|
if __himesan_error := __himesan_sando.WriteString(__himesan_writer, "</time> as request <strong>#"); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line internal/views/layout.sando:49:120
|
|
if __himesan_error := __himesan_sando.WriteText(__himesan_writer, (view.RequestNumber)); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
//line internal/views/layout.sando:49:141
|
|
if __himesan_error := __himesan_sando.WriteString(__himesan_writer, "</strong> since this process started.</p>\n <p>This HTML response is not cached. Refresh it and the server builds fresh typed data.</p>\n </footer>\n</body>\n</html>\n"); __himesan_error != nil {
|
|
return __himesan_error
|
|
}
|
|
return nil
|
|
})
|
|
}
|