26 lines
578 B
Plaintext
26 lines
578 B
Plaintext
package web
|
|
|
|
import "fmt"
|
|
import "net/http"
|
|
|
|
templ ErrorXXX(errCode int, reason, message, referer string) {
|
|
{{ errText := http.StatusText(errCode) }}
|
|
@base(errText, errText,
|
|
"", "", errText, nil) {
|
|
<section id="error">
|
|
<h1>{ fmt.Sprint(errCode) }</h1>
|
|
{ errText }
|
|
if reason != "" {
|
|
<p>{ reason }</p>
|
|
}
|
|
if message != "" {
|
|
<p>{ message }</p>
|
|
}
|
|
</section>
|
|
if referer != "" {
|
|
<section>
|
|
<h2><a href={ templ.URL(referer) }>Go back</a></h2>
|
|
</section>
|
|
}
|
|
}
|
|
} |