diff --git a/pkg/router.go b/pkg/router.go index e186bcd..e5c698d 100644 --- a/pkg/router.go +++ b/pkg/router.go @@ -72,6 +72,18 @@ func NewRouter(db *Db) http.Handler { router.PUT("/company/:slug/*rest", companyHandler) router.DELETE("/company/:slug/*rest", companyHandler) + router.GET("/legal", func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { + mustRenderWebTemplate(w, r, "legal.gohtml", nil) + }) + + router.GET("/privacy", func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { + mustRenderWebTemplate(w, r, "privacy.gohtml", nil) + }) + + router.GET("/cookies", func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { + mustRenderWebTemplate(w, r, "cookies.gohtml", nil) + }) + router.GET("/", func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { user := getUser(r) if user.LoggedIn { diff --git a/po/ca.po b/po/ca.po index 887dda7..0fec549 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: 2024-01-19 19:57+0100\n" +"POT-Creation-Date: 2024-01-19 22:33+0100\n" "PO-Revision-Date: 2023-01-18 17:08+0100\n" "Last-Translator: jordi fita mas \n" "Language-Team: Catalan \n" @@ -288,6 +288,39 @@ msgctxt "title" msgid "Edit Invoice “%s”" msgstr "Edició de la factura «%s»" +#: web/template/web.gohtml:14 +msgctxt "link" +msgid "Login" +msgstr "Entrada" + +#: web/template/web.gohtml:15 +msgctxt "link" +msgid "Demo" +msgstr "Demo" + +#: web/template/web.gohtml:16 +msgctxt "link" +msgid "Code" +msgstr "Codi" + +#: web/template/web.gohtml:27 web/template/legal.gohtml:2 +#: web/template/legal.gohtml:7 +msgctxt "title" +msgid "Legal Disclaimer" +msgstr "Avís legal" + +#: web/template/web.gohtml:28 web/template/privacy.gohtml:2 +#: web/template/privacy.gohtml:7 +msgctxt "title" +msgid "Privacy Policy" +msgstr "Política de privacitat" + +#: web/template/web.gohtml:29 web/template/cookies.gohtml:2 +#: web/template/cookies.gohtml:7 +msgctxt "title" +msgid "Cookies Policy" +msgstr "Política de cookies" + #: web/template/form.gohtml:36 msgctxt "input" msgid "(Max. %s)" @@ -1353,6 +1386,10 @@ msgctxt "input" msgid "Holded Excel file" msgstr "Fitxer Excel del Holded" +#~ msgctxt "link" +#~ msgid "login" +#~ msgstr "Entrada" + #~ msgid "If you want to sign in, just head to %sthe login page%s and enter your credentials in the form." #~ msgstr "Si vols accedir al teu usuari només has d'anar a %sla pàgina d’entrada%s i apuntar les teves credencials al seu lloc." diff --git a/po/es.po b/po/es.po index d8d01d0..4ecd313 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: 2024-01-19 19:57+0100\n" +"POT-Creation-Date: 2024-01-19 22:33+0100\n" "PO-Revision-Date: 2023-01-18 17:45+0100\n" "Last-Translator: jordi fita mas \n" "Language-Team: Spanish \n" @@ -288,6 +288,39 @@ msgctxt "title" msgid "Edit Invoice “%s”" msgstr "Edición de la factura «%s»" +#: web/template/web.gohtml:14 +msgctxt "link" +msgid "Login" +msgstr "Entrada" + +#: web/template/web.gohtml:15 +msgctxt "link" +msgid "Demo" +msgstr "Demo" + +#: web/template/web.gohtml:16 +msgctxt "link" +msgid "Code" +msgstr "Código" + +#: web/template/web.gohtml:27 web/template/legal.gohtml:2 +#: web/template/legal.gohtml:7 +msgctxt "title" +msgid "Legal Disclaimer" +msgstr "Aviso legal" + +#: web/template/web.gohtml:28 web/template/privacy.gohtml:2 +#: web/template/privacy.gohtml:7 +msgctxt "title" +msgid "Privacy Policy" +msgstr "Política de privacidad" + +#: web/template/web.gohtml:29 web/template/cookies.gohtml:2 +#: web/template/cookies.gohtml:7 +msgctxt "title" +msgid "Cookies Policy" +msgstr "Política de cookies" + #: web/template/form.gohtml:36 msgctxt "input" msgid "(Max. %s)" diff --git a/web/static/numerus.css b/web/static/numerus.css index 7b3a098..4885a75 100644 --- a/web/static/numerus.css +++ b/web/static/numerus.css @@ -548,24 +548,24 @@ ul[role="menu"].action-menu li i[class^='ri-'] { /* menu tauler */ #profile-menu summary:hover, #profile-menu summary:focus, ul[role="menu"].action-menu button:hover, ul[role="menu"].action-menu a:hover, body > nav a { - color: var(--numerus--text-color); - text-decoration: none; - transition: 0.25s ease; + color: var(--numerus--text-color); + text-decoration: none; + transition: 0.25s ease; } #profile-menu summary:hover, #profile-menu summary:focus, ul[role="menu"].action-menu button:hover, ul[role="menu"].action-menu a:hover, body > nav ul:hover a { - color: #ccc; + color: #ccc; } #profile-menu summary:hover, #profile-menu summary:focus, ul[role="menu"].action-menu button:hover, ul[role="menu"].action-menu a:hover, body > nav ul:hover a:hover { - color: var(--numerus--text-color); - text-decoration: none; + color: var(--numerus--text-color); + text-decoration: none; } #profile-menu summary:active, #profile-menu summary:active, ul[role="menu"].action-menu button:active, ul[role="menu"].action-menu a:active, body > nav ul:active li:active a:active { - color: var(--numerus--text-color); -text-decoration: none; + color: var(--numerus--text-color); + text-decoration: none; } body > nav a[aria-current] { @@ -1055,8 +1055,9 @@ div[x-data="snackbar"] div[role="alert"].enter.end, div[x-data="snackbar"] div[r } #income-statement div:nth-child(4) { - background: var(--numerus--color--hay); + background: var(--numerus--color--hay); } + #income-statement div:nth-child(4), #income-statement div:nth-child(5) { color: var(--numerus--color--black); @@ -10292,20 +10293,86 @@ div[x-data="snackbar"] div[role="alert"].enter.end, div[x-data="snackbar"] div[r padding-bottom: .9375em; } -.header-web { - display: flex; - justify-content: space-between; - border-bottom: 1px solid var(--numerus--color--black); +.web > header { + display: flex; + justify-content: space-between; + align-items: start; + border-bottom: 1px solid var(--numerus--color--black); } -.menu-web { - text-transform: uppercase; - display: flex; - gap: 5rem; +.web > footer { + border-top: 1px solid var(--numerus--color--black); + margin: 5rem 0; + padding: 5rem 0 0 0; } -.menu-web a { - color: var(--numerus--font-family); - text-decoration: none; + +.web nav ul { + list-style: none; + padding: 0; + text-transform: uppercase; + display: flex; + gap: 5rem; +} + +.web footer nav ul { + justify-content: center; + font-size: 83.3333%; + margin-top: 1em; +} + +.web nav a { + color: var(--numerus--font-family); + text-decoration: none; +} + +.web .legal h2 { + margin: .5em 0 1.5em 0; +} + +.web .legal address, +.web .legal h3, +.web .legal h4, +.web .legal dl { + margin: 1.5789em 0; +} + +.web .legal h2 { + counter-reset: section; +} + +.web .legal h3 { + text-transform: uppercase; + counter-reset: subsection; +} + +.web .legal h3::before { + counter-increment: section; + content: counter(section) ". "; +} + +.web .legal h4::before { + counter-increment: subsection; + content: counter(section) "." counter(subsection) ". "; +} + +.web .legal p { + line-height: 1.25; +} + +.web .legal p + p { + text-indent: 1em; +} + +.web .legal dl { + padding-inline-start: 40px; +} + +.web .legal dt { + font-weight: bold; +} + +.web .legal dt:not(:first-of-type) { + margin-top: 1.5789em; } #login { @@ -10317,22 +10384,21 @@ div[x-data="snackbar"] div[role="alert"].enter.end, div[x-data="snackbar"] div[r } #login button { - min-width: 26rem; - background-color: var(--numerus--color--black); - border: 2px solid var(--numerus--color--black); - text-transform: uppercase; - display: inline-block; - text-align: center; - padding: 1.55rem; - cursor: pointer; - color: var(--numerus--color--white); + min-width: 26rem; + background-color: var(--numerus--color--black); + border: 2px solid var(--numerus--color--black); + text-transform: uppercase; + display: inline-block; + text-align: center; + padding: 1.55rem; + cursor: pointer; + color: var(--numerus--color--white); } .contenidor { display: grid; grid-template-columns: repeat(2, 1fr); padding: 5rem 0; - } .graella { @@ -10415,98 +10481,92 @@ div[x-data="snackbar"] div[role="alert"].enter.end, div[x-data="snackbar"] div[r .descripcio { - display: flex; - gap: 5rem; - justify-content: space-around; - margin: 5rem 0; + display: flex; + gap: 5rem; + justify-content: space-around; + margin: 5rem 0; } .paragraf { - flex: 2; + flex: 2; } .paragraf p { - margin: 0 0 2rem 0; - max-width: 45%; + margin: 0 0 2rem 0; + max-width: 45%; } .llista { - flex: 1; + flex: 1; } .icon-list { - display: flex; - gap: 10px; - padding: 5px 0; + display: flex; + gap: 10px; + padding: 5px 0; } .icon-list svg { - width: 24px; + width: 24px; } .future { - margin: 5rem 0; + margin: 5rem 0; } .opensource { - display: flex; - justify-content: space-between; - gap: 5rem; - border-top: 1px solid var(--numerus--color--black); + display: flex; + justify-content: space-between; + gap: 5rem; + border-top: 1px solid var(--numerus--color--black); } .download button { - margin: 5rem 0; - background: var(--numerus--color--yellow); - border: var(--numerus--color--yellow); + margin: 5rem 0; + background: var(--numerus--color--yellow); + border: var(--numerus--color--yellow); } .quadradet { - width: 17rem; - height: 17rem; - background: white; + width: 17rem; + height: 17rem; + background: white; } .llicencia { - max-width: 50%; - display: flex; - flex-direction: column; - align-items: flex-end; - gap: 5rem; - margin: 17rem 0 0 0; + max-width: 50%; + display: flex; + flex-direction: column; + align-items: flex-end; + gap: 5rem; + margin: 17rem 0 0 0; } .price-section { - display: flex; - justify-content: space-between; - gap: 5rem; - border-top: 1px solid var(--numerus--color--black); - padding: 5rem 0 0 0; + display: flex; + justify-content: space-between; + gap: 5rem; + border-top: 1px solid var(--numerus--color--black); + padding: 5rem 0 0 0; } .price { - flex: 1; + flex: 1; } - + .price h3 { - font-size: 4rem; + font-size: 4rem; } .price h2 { - margin: 5rem 0 0 0; -} - -.price-detail { - display: flex; - flex-direction: row; - gap: 10px; - align-items: baseline; + margin: 5rem 0 0 0; } -.footer-web { - border-top: 1px solid var(--numerus--color--black); - margin: 5rem 0; - padding: 5rem 0 0 0; +.price-detail { + display: flex; + flex-direction: row; + gap: 10px; + align-items: baseline; } /* web responsive */ diff --git a/web/template/cookies.gohtml b/web/template/cookies.gohtml new file mode 100644 index 0000000..57f7675 --- /dev/null +++ b/web/template/cookies.gohtml @@ -0,0 +1,163 @@ +{{ define "title" -}} + {{( pgettext "Cookies Policy" "title" )}} +{{- end }} + +{{ define "content" -}} + +{{- end }} diff --git a/web/template/home.gohtml b/web/template/home.gohtml index 4b433cb..a5a492f 100644 --- a/web/template/home.gohtml +++ b/web/template/home.gohtml @@ -3,11 +3,6 @@ {{- end }} {{ define "content" -}} -
- - -
-
autònoms
@@ -92,9 +87,4 @@

Escriu-nos a hola@tandem.blog i donem d'alta

- - - {{- end }} diff --git a/web/template/legal.gohtml b/web/template/legal.gohtml new file mode 100644 index 0000000..dc93938 --- /dev/null +++ b/web/template/legal.gohtml @@ -0,0 +1,189 @@ +{{ define "title" -}} + {{( pgettext "Legal Disclaimer" "title" )}} +{{- end }} + +{{ define "content" -}} + +{{- end }} diff --git a/web/template/privacy.gohtml b/web/template/privacy.gohtml new file mode 100644 index 0000000..f179e76 --- /dev/null +++ b/web/template/privacy.gohtml @@ -0,0 +1,224 @@ +{{ define "title" -}} + {{( pgettext "Privacy Policy" "title" )}} +{{- end }} + +{{ define "content" -}} + +{{- end }} diff --git a/web/template/web.gohtml b/web/template/web.gohtml index eb13d22..907b958 100644 --- a/web/template/web.gohtml +++ b/web/template/web.gohtml @@ -1,12 +1,36 @@ - - - - {{ template "title" . }} — Numerus - - - - {{- template "content" . }} - + + + + {{ template "title" . }} — Numerus + + + + +
+

Numerus

+ +
+ +{{- template "content" . }} + + + +