From dde4395888d635cdfdec85f6c87d0bc46af7116b Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Sun, 11 Jun 2023 22:24:25 +0200 Subject: [PATCH] Add the most minimal home page design This is so that Oriol can start working on it. --- pkg/router.go | 2 +- po/ca.po | 31 ++++++++++++++++--------------- po/es.po | 31 ++++++++++++++++--------------- web/template/home.gohtml | 8 ++++++++ 4 files changed, 41 insertions(+), 31 deletions(-) create mode 100644 web/template/home.gohtml diff --git a/pkg/router.go b/pkg/router.go index 3cbc165..87f4492 100644 --- a/pkg/router.go +++ b/pkg/router.go @@ -77,7 +77,7 @@ func NewRouter(db *Db) http.Handler { } http.Redirect(w, r, companyURI(company, "/"), http.StatusFound) } else { - http.Redirect(w, r, "/login", http.StatusSeeOther) + mustRenderWebTemplate(w, r, "home.gohtml", nil) } }) diff --git a/po/ca.po b/po/ca.po index 324aa8e..cd81b1b 100644 --- a/po/ca.po +++ b/po/ca.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: numerus\n" "Report-Msgid-Bugs-To: jordi@tandem.blog\n" -"POT-Creation-Date: 2023-06-10 20:40+0200\n" +"POT-Creation-Date: 2023-06-11 22:23+0200\n" "PO-Revision-Date: 2023-01-18 17:08+0100\n" "Last-Translator: jordi fita mas \n" "Language-Team: Catalan \n" @@ -25,15 +25,15 @@ msgstr "Afegeix productes a la factura" #: web/template/invoices/products.gohtml:9 web/template/invoices/new.gohtml:9 #: web/template/invoices/index.gohtml:9 web/template/invoices/view.gohtml:9 -#: web/template/invoices/edit.gohtml:9 web/template/quotes/products.gohtml:9 -#: web/template/quotes/new.gohtml:9 web/template/quotes/index.gohtml:9 -#: web/template/quotes/view.gohtml:9 web/template/quotes/edit.gohtml:9 -#: web/template/contacts/new.gohtml:9 web/template/contacts/index.gohtml:9 -#: web/template/contacts/edit.gohtml:10 web/template/profile.gohtml:9 -#: web/template/expenses/new.gohtml:10 web/template/expenses/index.gohtml:10 -#: web/template/expenses/edit.gohtml:10 web/template/tax-details.gohtml:9 -#: web/template/products/new.gohtml:9 web/template/products/index.gohtml:9 -#: web/template/products/edit.gohtml:10 +#: web/template/invoices/edit.gohtml:9 web/template/home.gohtml:2 +#: web/template/quotes/products.gohtml:9 web/template/quotes/new.gohtml:9 +#: web/template/quotes/index.gohtml:9 web/template/quotes/view.gohtml:9 +#: web/template/quotes/edit.gohtml:9 web/template/contacts/new.gohtml:9 +#: web/template/contacts/index.gohtml:9 web/template/contacts/edit.gohtml:10 +#: web/template/profile.gohtml:9 web/template/expenses/new.gohtml:10 +#: web/template/expenses/index.gohtml:10 web/template/expenses/edit.gohtml:10 +#: web/template/tax-details.gohtml:9 web/template/products/new.gohtml:9 +#: web/template/products/index.gohtml:9 web/template/products/edit.gohtml:10 msgctxt "title" msgid "Home" msgstr "Inici" @@ -251,6 +251,12 @@ msgctxt "title" msgid "Edit Invoice “%s”" msgstr "Edició de la factura «%s»" +#: web/template/home.gohtml:7 web/template/login.gohtml:2 +#: web/template/login.gohtml:15 +msgctxt "title" +msgid "Login" +msgstr "Entrada" + #: web/template/form.gohtml:36 msgctxt "input" msgid "(Max. %s)" @@ -448,11 +454,6 @@ msgctxt "title" msgid "Edit Contact “%s”" msgstr "Edició del contacte «%s»" -#: web/template/login.gohtml:2 web/template/login.gohtml:15 -msgctxt "title" -msgid "Login" -msgstr "Entrada" - #: web/template/login.gohtml:19 msgctxt "action" msgid "Login" diff --git a/po/es.po b/po/es.po index 4db94bb..8f8f053 100644 --- a/po/es.po +++ b/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: numerus\n" "Report-Msgid-Bugs-To: jordi@tandem.blog\n" -"POT-Creation-Date: 2023-06-10 20:40+0200\n" +"POT-Creation-Date: 2023-06-11 22:23+0200\n" "PO-Revision-Date: 2023-01-18 17:45+0100\n" "Last-Translator: jordi fita mas \n" "Language-Team: Spanish \n" @@ -25,15 +25,15 @@ msgstr "Añadir productos a la factura" #: web/template/invoices/products.gohtml:9 web/template/invoices/new.gohtml:9 #: web/template/invoices/index.gohtml:9 web/template/invoices/view.gohtml:9 -#: web/template/invoices/edit.gohtml:9 web/template/quotes/products.gohtml:9 -#: web/template/quotes/new.gohtml:9 web/template/quotes/index.gohtml:9 -#: web/template/quotes/view.gohtml:9 web/template/quotes/edit.gohtml:9 -#: web/template/contacts/new.gohtml:9 web/template/contacts/index.gohtml:9 -#: web/template/contacts/edit.gohtml:10 web/template/profile.gohtml:9 -#: web/template/expenses/new.gohtml:10 web/template/expenses/index.gohtml:10 -#: web/template/expenses/edit.gohtml:10 web/template/tax-details.gohtml:9 -#: web/template/products/new.gohtml:9 web/template/products/index.gohtml:9 -#: web/template/products/edit.gohtml:10 +#: web/template/invoices/edit.gohtml:9 web/template/home.gohtml:2 +#: web/template/quotes/products.gohtml:9 web/template/quotes/new.gohtml:9 +#: web/template/quotes/index.gohtml:9 web/template/quotes/view.gohtml:9 +#: web/template/quotes/edit.gohtml:9 web/template/contacts/new.gohtml:9 +#: web/template/contacts/index.gohtml:9 web/template/contacts/edit.gohtml:10 +#: web/template/profile.gohtml:9 web/template/expenses/new.gohtml:10 +#: web/template/expenses/index.gohtml:10 web/template/expenses/edit.gohtml:10 +#: web/template/tax-details.gohtml:9 web/template/products/new.gohtml:9 +#: web/template/products/index.gohtml:9 web/template/products/edit.gohtml:10 msgctxt "title" msgid "Home" msgstr "Inicio" @@ -251,6 +251,12 @@ msgctxt "title" msgid "Edit Invoice “%s”" msgstr "Edición de la factura «%s»" +#: web/template/home.gohtml:7 web/template/login.gohtml:2 +#: web/template/login.gohtml:15 +msgctxt "title" +msgid "Login" +msgstr "Entrada" + #: web/template/form.gohtml:36 msgctxt "input" msgid "(Max. %s)" @@ -448,11 +454,6 @@ msgctxt "title" msgid "Edit Contact “%s”" msgstr "Edición del contacto «%s»" -#: web/template/login.gohtml:2 web/template/login.gohtml:15 -msgctxt "title" -msgid "Login" -msgstr "Entrada" - #: web/template/login.gohtml:19 msgctxt "action" msgid "Login" diff --git a/web/template/home.gohtml b/web/template/home.gohtml new file mode 100644 index 0000000..0e2eeea --- /dev/null +++ b/web/template/home.gohtml @@ -0,0 +1,8 @@ +{{ define "title" -}} + {{( pgettext "Home" "title" )}} +{{- end }} + +{{ define "content" -}} +

Numerus

+ {{( pgettext "Login" "title" )}} +{{- end }}