move presentation to templates
This commit is contained in:
parent
1c533926ca
commit
d9146750ba
5 changed files with 70 additions and 69 deletions
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
"git.sapphic.engineer/roleypoly/v4/auth/authmiddleware"
|
||||
"git.sapphic.engineer/roleypoly/v4/discord"
|
||||
"git.sapphic.engineer/roleypoly/v4/presentation"
|
||||
"git.sapphic.engineer/roleypoly/v4/templates/components"
|
||||
"git.sapphic.engineer/roleypoly/v4/types"
|
||||
"git.sapphic.engineer/roleypoly/v4/types/fixtures"
|
||||
)
|
||||
|
@ -39,12 +39,12 @@ func (t *TestingController) TestTemplate(c fiber.Ctx) error {
|
|||
cat1 := fixtures.Category(fixtures.CategoryMulti)
|
||||
cat2 := fixtures.Category(fixtures.CategorySingle)
|
||||
return c.Render("tests/"+which, fiber.Map{
|
||||
"TestRole": presentation.Role(cat1, &fixtures.RoleWithDarkColor, false),
|
||||
"TestRole2": presentation.Role(cat1, &fixtures.RoleWithDarkMediumColor, false),
|
||||
"TestRole3": presentation.Role(cat1, &fixtures.RoleWithLightColor, true),
|
||||
"TestRole4": presentation.Role(cat1, &fixtures.RoleWithDarkColor, false),
|
||||
"TestRole5": presentation.Role(cat2, &fixtures.RoleWithLightColor, true),
|
||||
"TestRole6": presentation.Role(cat1, &fixtures.RoleWithLightMediumColor, false),
|
||||
"TestRole": components.Role(cat1, &fixtures.RoleWithDarkColor, false),
|
||||
"TestRole2": components.Role(cat1, &fixtures.RoleWithDarkMediumColor, false),
|
||||
"TestRole3": components.Role(cat1, &fixtures.RoleWithLightColor, true),
|
||||
"TestRole4": components.Role(cat1, &fixtures.RoleWithDarkColor, false),
|
||||
"TestRole5": components.Role(cat2, &fixtures.RoleWithLightColor, true),
|
||||
"TestRole6": components.Role(cat1, &fixtures.RoleWithLightMediumColor, false),
|
||||
}, "layouts/main")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue