diff --git a/app/templates/base/base.jet b/app/templates/base/base.jet index 97379d7..bd91990 100644 --- a/app/templates/base/base.jet +++ b/app/templates/base/base.jet @@ -9,24 +9,47 @@ Document + + +
-

{{ title }}

- - -
{{ yield mainContent() }}
diff --git a/app/templates/pages/index.jet b/app/templates/pages/index.jet index 5f4af85..763467d 100644 --- a/app/templates/pages/index.jet +++ b/app/templates/pages/index.jet @@ -4,27 +4,21 @@ {{ block mainContent() }} -
-
-
-
- - -
-
- - -
+
+ +
+ + +
+
+ + +
- - - -
-
- -
+ +
diff --git a/app/templates/pages/users.jet b/app/templates/pages/users.jet index bc468fc..154fa9d 100644 --- a/app/templates/pages/users.jet +++ b/app/templates/pages/users.jet @@ -6,6 +6,6 @@

Users

-{{ yield usersTable(users=users) }} +{{ yield usersTable(users=.users) }} {{ end }} \ No newline at end of file diff --git a/app/views/about.go b/app/views/about.go index d585f25..7317df9 100644 --- a/app/views/about.go +++ b/app/views/about.go @@ -3,7 +3,11 @@ package views import "github.com/kataras/iris/v12" func GetAboutPage(ctx iris.Context) { - if err := ctx.View("pages/about.jet"); err != nil { + vars := iris.Map{ + "activePage": "about", + } + + if err := ctx.View("pages/about.jet", vars); err != nil { showError(ctx, err) return } diff --git a/app/views/index.go b/app/views/index.go index 545de7f..867ccd2 100644 --- a/app/views/index.go +++ b/app/views/index.go @@ -7,7 +7,11 @@ import ( ) func GetIndexPage(ctx iris.Context) { - if err := ctx.View("pages/index.jet"); err != nil { + vars := iris.Map{ + "activePage": "index", + } + + if err := ctx.View("pages/index.jet", vars); err != nil { showError(ctx, err) return } diff --git a/app/views/users.go b/app/views/users.go index 9d47103..5450576 100644 --- a/app/views/users.go +++ b/app/views/users.go @@ -27,9 +27,12 @@ func GetUsersPage(ctx iris.Context) { isActive := true users := userRepository.List(&repository.UserFilter{IsActive: &isActive}, &pagination, &ordering) - ctx.ViewData("users", users) + vars := iris.Map{ + "activePage": "users", + "users": users, + } - if err := ctx.View("pages/users.jet"); err != nil { + if err := ctx.View("pages/users.jet", vars); err != nil { showError(ctx, err) return } @@ -43,6 +46,7 @@ func EditUserPage(ctx iris.Context) { user := userRepository.Get(&filter) vars := iris.Map{ + "activePage": "users", "user": user, "currentPath": ctx.Path(), "backlink": "/users", diff --git a/static/example.png b/static/example.png new file mode 100644 index 0000000..2fc35ff Binary files /dev/null and b/static/example.png differ diff --git a/static/sample.jpg b/static/sample.jpg deleted file mode 100644 index cc4a932..0000000 Binary files a/static/sample.jpg and /dev/null differ diff --git a/static/styles.css b/static/styles.css new file mode 100644 index 0000000..39e77de --- /dev/null +++ b/static/styles.css @@ -0,0 +1,6 @@ +header.navbar { + background-color: #e0e0e0; +} +header.navbar .navbar-brand img { + max-height: 80px; +}/*# sourceMappingURL=styles.css.map */ \ No newline at end of file diff --git a/static/styles.css.map b/static/styles.css.map new file mode 100644 index 0000000..08fe2e3 --- /dev/null +++ b/static/styles.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["styles.scss","styles.css"],"names":[],"mappings":"AAAA;EACI,yBAAA;ACCJ;ADAI;EACI,gBAAA;ACER","file":"styles.css"} \ No newline at end of file diff --git a/static/styles.scss b/static/styles.scss new file mode 100644 index 0000000..965cf1d --- /dev/null +++ b/static/styles.scss @@ -0,0 +1,6 @@ +header.navbar { + background-color: #e0e0e0; + .navbar-brand img { + max-height: 80px; + } +}