diff --git a/internal/views/login/login-form.templ b/internal/views/login/login-form.templ new file mode 100644 index 0000000..020b8ac --- /dev/null +++ b/internal/views/login/login-form.templ @@ -0,0 +1,40 @@ +package login + +templ LoginFormContent(params LoginFormParams) { + + + +} diff --git a/internal/views/login/login.go b/internal/views/login/login.go new file mode 100644 index 0000000..a2ac72c --- /dev/null +++ b/internal/views/login/login.go @@ -0,0 +1,12 @@ +package login + +type LoginPageParams struct { + ReturnUrl string + ErrorCode string +} + +type LoginFormParams struct { + ReturnUrl string + Handle string + ErrorMessage string +} diff --git a/internal/views/login/login.templ b/internal/views/login/login.templ new file mode 100644 index 0000000..29577e7 --- /dev/null +++ b/internal/views/login/login.templ @@ -0,0 +1,39 @@ +package login + +import "shelf.app/internal/layouts/base" + +templ LoginPage(params LoginPageParams) { + @layouts.Base(layouts.BaseParams{Title: "login"}) { +
+ switch (params.ErrorCode) { + case "access_denied": + You have not authorized the app. + case "session": + Server failed to create user session. + case "handle": + Server failed to validate your handle. + default: + Internal Server error. + } + Please try again. +
+ } +