package templates // import "github.com/pomerium/pomerium/internal/templates" import ( "html/template" ) // New loads html and style resources directly. Panics on failure. func New() *template.Template { t := template.New("authenticate-templates") template.Must(t.Parse(` {{define "header.html"}} {{end}}`)) t = template.Must(t.Parse(`{{define "footer.html"}}Secured by pomerium {{end}}`)) t = template.Must(t.Parse(` {{define "sign_in_message.html"}} {{if eq (len .AllowedDomains) 1}} {{if eq (index .AllowedDomains 0) "@*"}}
You may sign in with any {{.ProviderName}} account.
{{else}}You may sign in with your {{index .AllowedDomains 0}} {{.ProviderName}} account.
{{end}} {{else if gt (len .AllowedDomains) 1}}
You may sign in with any of these {{.ProviderName}} accounts:
{{range $i, $e := .AllowedDomains}}{{if $i}}, {{end}}{{$e}}{{end}}
{{.Message}}
HTTP {{.Code}}
You're currently signed in as {{.Email}}. This will also sign you out of other internal apps.