package templates import ( domain "github.com/haydenhargreaves/Potion/internal/domain/recipe" domainUser "github.com/haydenhargreaves/Potion/internal/domain/user" "github.com/haydenhargreaves/Potion/internal/templates/components" "time" ) templ servingIcon() { } templ timeIcon() { } templ starIcon(filled bool) { if filled { } else { } } templ RecipePage(recipe domain.Recipe, user domainUser.User) { @components.Navbar("")
Author: { user.Name }
Category: { recipe.Category }
{ recipe.Description }
Prep: { recipe.Duration.Prep } min
Cook: { recipe.Duration.Cook } min
{ recipe.Difficulty }
Serves { recipe.Serves }
Created: { created.Format("January 2, 2006") }
if modified != nil {Last Modified: { modified.Format("January 2, 2006") }
}{ content }