package frontend

import "embed"

//go:embed templates
var templates embed.FS

func readFilename(filename string) string {
	f, err := templates.ReadFile(filename)
	if err != nil {
		panic(err)
	}
	return string(f)
}

func EditPage() string {
	return readFilename("templates/edit.html.tmpl")
}

func AdminPage() string {
	return readFilename("templates/admin.html.tmpl")
}

func AuthorPage() string {
	return readFilename("templates/author.html.tmpl")
}

func UploadPage() string {
	return readFilename("templates/upload.html.tmpl")
}
