Compare commits

..

No commits in common. "1f5a20afb30d70cadbc0cd34b42ec140462a4f36" and "b98bf5ce392da1dc5e652602db2d9352c6eac65f" have entirely different histories.

2 changed files with 169 additions and 180 deletions

View File

@ -9,190 +9,177 @@ import domainUser "github.com/haydenhargreaves/Potion/internal/domain/user"
import domainEngagement "github.com/haydenhargreaves/Potion/internal/domain/engagement" import domainEngagement "github.com/haydenhargreaves/Potion/internal/domain/engagement"
func displayDifficulty(diff int) string { func displayDifficulty(diff int) string {
switch diff { switch diff {
case 1: case 1:
return "Beginner" return "Beginner"
case 2: case 2:
return "Easy" return "Easy"
case 3: case 3:
return "Intermediate" return "Intermediate"
case 4: case 4:
return "Challenging" return "Challenging"
case 5: case 5:
return "Extreme" return "Extreme"
default: default:
return "" return ""
} }
} }
func displayTags(tags []domainRecipe.Tag) string { func displayTags(tags []domainRecipe.Tag) string {
names := make([]string, 0, len(tags)) names := make([]string, 0, len(tags))
for _, tag := range tags { for _, tag := range tags {
names = append(names, tag.Name) names = append(names, tag.Name)
} }
return strings.Join(names, ", ") return strings.Join(names, ", ")
} }
templ userDetailsSection(user domainUser.User, recipeCount int, favoriteCount int) { templ userDetailsSection(user domainUser.User, recipeCount int, favoriteCount int) {
<section class="w-full flex flex-col justify-center my-8 py-4 border-b border-gray-300"> <section class="w-full flex flex-col justify-center my-8 py-4 border-b border-gray-300">
<div class="w-full p-4 md:p-8 flex items-center gap-x-8"> <div class="w-full p-4 md:p-8 flex items-center gap-x-8">
if user.ImageUrl != "" { if user.ImageUrl != "" {
<img <img class="w-24 md:w-32 border-2 border-blue-500 rounded-full shadow-blue-500 shadow select-none" src={
class="w-24 md:w-32 border-2 border-blue-500 rounded-full shadow-blue-500 shadow select-none" user.ImageUrl } />
src={ user.ImageUrl } } else {
/> <img class="w-24 md:w-32 border-2 border-blue-500 rounded-full shadow-blue-500 shadow select-none" src={
} else { fmt.Sprintf("https://ui-avatars.com/api/?name=%s+%s&size=150", strings.Split(user.Name, " " )[0],
<img strings.Split(user.Name, " " )[1]) } />
class="w-24 md:w-32 border-2 border-blue-500 rounded-full shadow-blue-500 shadow select-none" }
src={ fmt.Sprintf("https://ui-avatars.com/api/?name=%s+%s&size=150", strings.Split(user.Name, " " )[0], <div class="flex flex-col gap-y-4">
strings.Split(user.Name, " " )[1]) } <div class="">
/> <h1 class="text-md md:text-2xl font-semibold">{ user.Name }</h1>
} <p class="text-xs md:text-sm">{ user.Email }</p>
<div class="flex flex-col gap-y-4"> </div>
<div class=""> <div class="flex gap-x-4">
<h1 class="text-md md:text-2xl font-semibold">{ user.Name }</h1> <p class="text-xs md:text-sm"><span class="font-bold">{ recipeCount }</span> recipes</p>
<p class="text-xs md:text-sm">{ user.Email }</p> <p class="text-xs md:text-sm"><span class="font-bold">{ favoriteCount }</span> favorites</p>
</div> </div>
<div class="flex gap-x-4"> </div>
<p class="text-xs md:text-sm"><span class="font-bold">{ recipeCount }</span> recipes</p> </div>
<p class="text-xs md:text-sm"><span class="font-bold">{ favoriteCount }</span> favorites</p> </section>
</div>
</div>
</div>
</section>
} }
templ recipesSection(recipes []domainRecipe.Recipe) { templ recipesSection(recipes []domainRecipe.Recipe) {
<section class="p-8"> <section class="p-8">
<h2 class="text-2xl font-semibold text-gray-800">My Recipes</h2> <h2 class="text-2xl font-semibold text-gray-800">My Recipes</h2>
<ul class="w-full my-2"> <ul class="w-full my-2">
if len(recipes) <= 4 { if len(recipes) <= 4 {
for _, recipe :=range recipes { for _, recipe :=range recipes {
@recipeListItem(recipe) @recipeListItem(recipe)
} }
} else { } else {
for _, recipe :=range recipes[:4] { for _, recipe :=range recipes[:4] {
@recipeListItem(recipe) @recipeListItem(recipe)
} }
} }
<a href={ domain.WEB_NOT_FOUND }> <a href={ domain.WEB_NOT_FOUND }>
<li <li
class="w-full border-b border-gray-300 px-2 py-4 even:bg-gray-50 hover:bg-gray-100 hover:text-blue-600 duration-150 text-center" class="w-full border-b border-gray-300 px-2 py-4 even:bg-gray-50 hover:bg-gray-100 hover:text-blue-600 duration-150 text-center">
> See all...
See all... </li>
</li> </a>
</a> </ul>
</ul> </section>
</section>
} }
templ favoritesSection(recipes []domainRecipe.Recipe) { templ favoritesSection(recipes []domainRecipe.Recipe) {
<section class="p-8"> <section class="p-8">
<h2 class="text-2xl font-semibold text-gray-800">My Favorites</h2> <h2 class="text-2xl font-semibold text-gray-800">My Favorites</h2>
<ul class="w-full my-2"> <ul class="w-full my-2">
if len(recipes) <= 4 { if len(recipes) <= 4 {
for _, recipe := range recipes { for _, recipe := range recipes {
@recipeListItem(recipe) @recipeListItem(recipe)
} }
} else { } else {
for _, recipe := range recipes[:4] { for _, recipe := range recipes[:4] {
@recipeListItem(recipe) @recipeListItem(recipe)
} }
} }
<a href={ domain.WEB_FAVORITES }> <a href={ domain.WEB_FAVORITES }>
<li <li
class="w-full border-b border-gray-300 px-2 py-4 even:bg-gray-50 hover:bg-gray-100 hover:text-blue-600 duration-150 text-center" class="w-full border-b border-gray-300 px-2 py-4 even:bg-gray-50 hover:bg-gray-100 hover:text-blue-600 duration-150 text-center">
> See all...
See all... </li>
</li> </a>
</a> </ul>
</ul> </section>
</section>
} }
templ activitySection(engagement []domainEngagement.Engagement) { templ activitySection(engagement []domainEngagement.Engagement) {
<section class="p-8"> <section class="p-8">
<h2 class="text-2xl font-semibold text-gray-800">Recent Activity</h2> <h2 class="text-2xl font-semibold text-gray-800">Recent Activity</h2>
<ul class="w-full my-2"> <p class="text-sm my-2">Activity section is under construction!</p>
for _, eng := range engagement { <ul class="w-full my-2">
@activityListItem(eng) for _, eng := range engagement {
} @activityListItem(eng)
<a href={ domain.WEB_NOT_FOUND }> }
<li <a href={ domain.WEB_NOT_FOUND }>
class="w-full border-b border-gray-300 px-2 py-4 even:bg-gray-50 hover:bg-gray-100 hover:text-blue-600 duration-150 text-center" <li
> class="w-full border-b border-gray-300 px-2 py-4 even:bg-gray-50 hover:bg-gray-100 hover:text-blue-600 duration-150 text-center">
See all... See all...
</li> </li>
</a> </a>
</ul> </ul>
</section> </section>
} }
templ recipeListItem(recipe domainRecipe.Recipe) { templ recipeListItem(recipe domainRecipe.Recipe) {
<li class="w-full border-b border-gray-300 px-2 py-4 even:bg-gray-50 hover:bg-gray-100 duration-150"> <li class="w-full border-b border-gray-300 px-2 py-4 even:bg-gray-50 hover:bg-gray-100 duration-150">
<p <p hx-post={ fmt.Sprintf(domain.API_ENGAGEMENT_VIEW, recipe.Id) } hx-trigger="click" hx-swap="none"
hx-post={ fmt.Sprintf(domain.API_ENGAGEMENT_VIEW, recipe.Id) } class="text-base md:text-lg hover:text-blue-600 duration-100 cursor-pointer">
hx-trigger="click" { recipe.Title }
hx-swap="none" </p>
class="text-base md:text-lg hover:text-blue-600 duration-100 cursor-pointer" <p class="hidden md:block text-sm text-gray-700 my-1.5">
> Difficulty: <span class="font-semibold">{ displayDifficulty(recipe.Difficulty) }</span>
{ recipe.Title } | Duration: <span class="font-semibold">{ recipe.Duration.Total } min</span>
</p> | Category: <span class="font-semibold">{ recipe.Category }</span>
<p class="hidden md:block text-sm text-gray-700 my-1.5"> </p>
Difficulty: <span class="font-semibold">{ displayDifficulty(recipe.Difficulty) }</span> <p class="md:hidden text-xs md:text-sm text-gray-700 my-1">
| Duration: <span class="font-semibold">{ recipe.Duration.Total } min</span> Difficulty: <span class="font-semibold">{ displayDifficulty(recipe.Difficulty) }</span>
| Category: <span class="font-semibold">{ recipe.Category }</span> </p>
</p> <p class="md:hidden text-xs md:text-sm text-gray-700 my-1">
<p class="md:hidden text-xs md:text-sm text-gray-700 my-1"> Duration: <span class="font-semibold">{ recipe.Duration.Total } min</span>
Difficulty: <span class="font-semibold">{ displayDifficulty(recipe.Difficulty) }</span> </p>
</p> <p class="md:hidden text-xs md:text-sm text-gray-700 my-1">
<p class="md:hidden text-xs md:text-sm text-gray-700 my-1"> Category: <span class="font-semibold">{ recipe.Category }</span>
Duration: <span class="font-semibold">{ recipe.Duration.Total } min</span> </p>
</p> if len(recipe.Tags) > 0 {
<p class="md:hidden text-xs md:text-sm text-gray-700 my-1"> <p class="text-xs italic text-gray-500">
Category: <span class="font-semibold">{ recipe.Category }</span> Tags: { displayTags(recipe.Tags) }
</p> </p>
if len(recipe.Tags) > 0 { }
<p class="text-xs italic text-gray-500"> </li>
Tags: { displayTags(recipe.Tags) }
</p>
}
</li>
} }
templ activityListItem(engagement domainEngagement.Engagement) { templ activityListItem(engagement domainEngagement.Engagement) {
<li <li
class="w-full border-b border-gray-300 px-2 py-4 even:bg-gray-50 hover:bg-gray-100 duration-150 flex justify-between items-center" class="w-full border-b border-gray-300 px-2 py-4 even:bg-gray-50 hover:bg-gray-100 duration-150 flex justify-between items-center">
> <p class="text-sm md:text-base text-gray-800">
<p class="text-sm md:text-base text-gray-800"> { engagement.Message }
{ engagement.Message } </p>
</p> <p class="text-xs md:text-sm text-gray-600 w-fit shrink-0">
<p class="text-xs md:text-sm text-gray-600 w-fit shrink-0"> { engagement.Created.Format("01/02/2006") }
{ engagement.Created.Format("01/02/2006") } </p>
</p> </li>
</li>
} }
templ logoutSection() { templ logoutSection() {
<section class="w-full flex flex-col justify-center items-center py-8 border-t border-gray-300 mt-auto"> <section class="w-full flex flex-col justify-center items-center py-8 border-t border-gray-300 mt-auto">
<a <a href={ domain.API_AUTH_LOGOUT }
href={ domain.API_AUTH_LOGOUT } class="text-center border border-red-500 text-red-500 w-9/10 md:w-1/3 py-2 rounded-lg hover:cursor-pointer hover:bg-red-100 duration-300">
class="text-center border border-red-500 text-red-500 w-9/10 md:w-1/3 py-2 rounded-lg hover:cursor-pointer hover:bg-red-100 duration-300" Logout
> </a>
Logout </section>
</a>
</section>
} }
templ ProfilePage(user domainUser.User, recipes []domainRecipe.Recipe, favorites []domainRecipe.Recipe, engagement []domainEngagement.Engagement) { templ ProfilePage(user domainUser.User, recipes []domainRecipe.Recipe, favorites []domainRecipe.Recipe, engagement []domainEngagement.Engagement) {
@components.Navbar(" profile") @components.Navbar(" profile")
<div class="w-full h-fit flex justify-center"> <div class="w-full h-fit flex justify-center">
<div class="mx-2 md:mx-0 w-full md:w-1/2 md:pt-14 border-l border-r border-gray-300 bg-white flex flex-col"> <div class="mx-2 md:mx-0 w-full md:w-1/2 md:pt-14 border-l border-r border-gray-300 bg-white flex flex-col">
@userDetailsSection(user, len(recipes), len(favorites)) @userDetailsSection(user, len(recipes), len(favorites))
@recipesSection(recipes) @recipesSection(recipes)
@favoritesSection(favorites) @favoritesSection(favorites)
@activitySection(engagement) @activitySection(engagement)
@logoutSection() @logoutSection()
</div> </div>
</div> </div>
} }

View File

@ -72,9 +72,10 @@ func userDetailsSection(user domainUser.User, recipeCount int, favoriteCount int
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
var templ_7745c5c3_Var2 string var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(user.ImageUrl) templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(
user.ImageUrl)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 42, Col: 24} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 41, Col: 19}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -90,10 +91,11 @@ func userDetailsSection(user domainUser.User, recipeCount int, favoriteCount int
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
var templ_7745c5c3_Var3 string var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("https://ui-avatars.com/api/?name=%s+%s&size=150", strings.Split(user.Name, " ")[0], templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(
strings.Split(user.Name, " ")[1])) fmt.Sprintf("https://ui-avatars.com/api/?name=%s+%s&size=150", strings.Split(user.Name, " ")[0],
strings.Split(user.Name, " ")[1]))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 48, Col: 40} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 45, Col: 40}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -111,7 +113,7 @@ func userDetailsSection(user domainUser.User, recipeCount int, favoriteCount int
var templ_7745c5c3_Var4 string var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(user.Name) templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(user.Name)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 53, Col: 62} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 49, Col: 65}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -124,7 +126,7 @@ func userDetailsSection(user domainUser.User, recipeCount int, favoriteCount int
var templ_7745c5c3_Var5 string var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(user.Email) templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(user.Email)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 54, Col: 47} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 50, Col: 50}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -137,7 +139,7 @@ func userDetailsSection(user domainUser.User, recipeCount int, favoriteCount int
var templ_7745c5c3_Var6 string var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(recipeCount) templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(recipeCount)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 57, Col: 72} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 53, Col: 75}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -150,7 +152,7 @@ func userDetailsSection(user domainUser.User, recipeCount int, favoriteCount int
var templ_7745c5c3_Var7 string var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(favoriteCount) templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(favoriteCount)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 58, Col: 74} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 54, Col: 77}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -299,7 +301,7 @@ func activitySection(engagement []domainEngagement.Engagement) templ.Component {
templ_7745c5c3_Var12 = templ.NopComponent templ_7745c5c3_Var12 = templ.NopComponent
} }
ctx = templ.ClearChildren(ctx) ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "<section class=\"p-8\"><h2 class=\"text-2xl font-semibold text-gray-800\">Recent Activity</h2><ul class=\"w-full my-2\">") templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "<section class=\"p-8\"><h2 class=\"text-2xl font-semibold text-gray-800\">Recent Activity</h2><p class=\"text-sm my-2\">Activity section is under construction!</p><ul class=\"w-full my-2\">")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@ -354,7 +356,7 @@ func recipeListItem(recipe domainRecipe.Recipe) templ.Component {
var templ_7745c5c3_Var15 string var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf(domain.API_ENGAGEMENT_VIEW, recipe.Id)) templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf(domain.API_ENGAGEMENT_VIEW, recipe.Id))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 134, Col: 63} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 127, Col: 65}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -367,7 +369,7 @@ func recipeListItem(recipe domainRecipe.Recipe) templ.Component {
var templ_7745c5c3_Var16 string var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(recipe.Title) templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(recipe.Title)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 139, Col: 17} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 129, Col: 18}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -380,7 +382,7 @@ func recipeListItem(recipe domainRecipe.Recipe) templ.Component {
var templ_7745c5c3_Var17 string var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(displayDifficulty(recipe.Difficulty)) templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(displayDifficulty(recipe.Difficulty))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 142, Col: 81} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 132, Col: 82}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -393,7 +395,7 @@ func recipeListItem(recipe domainRecipe.Recipe) templ.Component {
var templ_7745c5c3_Var18 string var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(recipe.Duration.Total) templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(recipe.Duration.Total)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 143, Col: 66} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 133, Col: 67}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -406,7 +408,7 @@ func recipeListItem(recipe domainRecipe.Recipe) templ.Component {
var templ_7745c5c3_Var19 string var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(recipe.Category) templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(recipe.Category)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 144, Col: 60} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 134, Col: 61}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -419,7 +421,7 @@ func recipeListItem(recipe domainRecipe.Recipe) templ.Component {
var templ_7745c5c3_Var20 string var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(displayDifficulty(recipe.Difficulty)) templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(displayDifficulty(recipe.Difficulty))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 147, Col: 81} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 137, Col: 82}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -432,7 +434,7 @@ func recipeListItem(recipe domainRecipe.Recipe) templ.Component {
var templ_7745c5c3_Var21 string var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(recipe.Duration.Total) templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(recipe.Duration.Total)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 150, Col: 64} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 140, Col: 65}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -445,7 +447,7 @@ func recipeListItem(recipe domainRecipe.Recipe) templ.Component {
var templ_7745c5c3_Var22 string var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(recipe.Category) templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(recipe.Category)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 153, Col: 58} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 143, Col: 59}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -463,7 +465,7 @@ func recipeListItem(recipe domainRecipe.Recipe) templ.Component {
var templ_7745c5c3_Var23 string var templ_7745c5c3_Var23 string
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(displayTags(recipe.Tags)) templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(displayTags(recipe.Tags))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 157, Col: 36} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 147, Col: 36}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -510,7 +512,7 @@ func activityListItem(engagement domainEngagement.Engagement) templ.Component {
var templ_7745c5c3_Var25 string var templ_7745c5c3_Var25 string
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(engagement.Message) templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(engagement.Message)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 168, Col: 23} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 157, Col: 24}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -523,7 +525,7 @@ func activityListItem(engagement domainEngagement.Engagement) templ.Component {
var templ_7745c5c3_Var26 string var templ_7745c5c3_Var26 string
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(engagement.Created.Format("01/02/2006")) templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(engagement.Created.Format("01/02/2006"))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 171, Col: 44} return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/templates/pages/profile.templ`, Line: 160, Col: 45}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {