diff --git a/go.mod b/go.mod index c25c3b9..8ccaa4e 100644 --- a/go.mod +++ b/go.mod @@ -72,6 +72,7 @@ require ( github.com/go-sql-driver/mysql v1.8.1 // indirect github.com/go-test/deep v1.1.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang-jwt/jwt/v5 v5.2.1 // indirect github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect github.com/golang-sql/sqlexp v0.1.0 // indirect github.com/golang/protobuf v1.5.4 // indirect diff --git a/go.sum b/go.sum index 1d12dea..72e483b 100644 --- a/go.sum +++ b/go.sum @@ -248,6 +248,8 @@ github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= +github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= diff --git a/public/img/logousite.webp b/public/img/logousite.webp new file mode 100644 index 0000000..a4aa69c Binary files /dev/null and b/public/img/logousite.webp differ diff --git a/resources/views/index.html b/resources/views/index.html index 65b484c..e9c3645 100644 --- a/resources/views/index.html +++ b/resources/views/index.html @@ -1,5 +1,5 @@ -
+

Oficina Virtual

@@ -12,11 +12,10 @@

Volver a la pagina principal

-
Cargando...
- - -
\ No newline at end of file +
+
+
\ No newline at end of file diff --git a/resources/views/login.html b/resources/views/login.html new file mode 100644 index 0000000..5a4618b --- /dev/null +++ b/resources/views/login.html @@ -0,0 +1,59 @@ +
+
+ Logo de la empresa +
+
+
+ + + +
+
+

Bienvenido

+
+
+ + + + +
+
+ + + + +
+ +
+
+ ¿Olvidaste tu contraseña? +
+
+ + \ No newline at end of file diff --git a/rest/controllers/login_controller.go b/rest/controllers/login_controller.go new file mode 100644 index 0000000..dc2d816 --- /dev/null +++ b/rest/controllers/login_controller.go @@ -0,0 +1,22 @@ +package controllers + +import ( + "github.com/gofiber/fiber/v2" +) + +// RENDER +func Login(c *fiber.Ctx) error { + data := fiber.Map{ + //"user": c.Locals("user").(map[string]interface{}), + //"modules": c.Locals("userModules"), + } + + // Renderiza la vista con el layout layouts/main + if err := c.Render("login", data, "layouts/public"); err != nil { + return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{ + "message": "Error rendering template", + "error": err.Error(), + }) + } + return nil +} diff --git a/rest/routes/publicas.go b/rest/routes/publicas.go index cd61410..f571a73 100644 --- a/rest/routes/publicas.go +++ b/rest/routes/publicas.go @@ -9,10 +9,9 @@ import ( func RutasPublicas(web fiber.Router) { //web.Get("/", controllers.Landing) web.Get("/index", controllers.Index) + web.Get("/login", controllers.Login) web.Get("/ping", Pong) web.Get("/all-routes", AllRoutes) web.Get("/do/verify-email", middlewares.ValidateConfirmToken, controllers.VerifyRegisteredEmail) - } -