summaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-08-08 01:33:04 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-08-08 01:33:49 +0200
commit4db5a4cc4effb2818809469e92859798a756919a (patch)
tree15b46ec003d8fb86a1c1d0a0805cdd037101e5d7 /templates
parent9135f6bdf939864f89a5abc4641902faea28d5e8 (diff)
Add an about page
Diffstat (limited to 'templates')
-rw-r--r--templates/about.templ52
-rw-r--r--templates/about_templ.go185
-rw-r--r--templates/navbar.templ2
-rw-r--r--templates/navbar_templ.go4
4 files changed, 240 insertions, 3 deletions
diff --git a/templates/about.templ b/templates/about.templ
new file mode 100644
index 0000000..18cdc4e
--- /dev/null
+++ b/templates/about.templ
@@ -0,0 +1,52 @@
+package templates
+
+import "git.thomasvoss.com/euro-cash.eu/i18n"
+
+const (
+ contactEmail = `<a href="mailto:mail@euro-cash.eu">mail@euro-cash.eu</a>`
+ linkStart = `<a href="https://git.thomasvoss.com/www.euro-cash.eu" target="_blank">`
+ linkEnd = `</a>`
+)
+
+templ About() {
+ {{ p := ctx.Value("printer").(i18n.Printer) }}
+ <header>
+ @navbar()
+ <h1>{ p.T("About Us") }</h1>
+ </header>
+ <main>
+ <h2>{ p.T("Open Source") }</h2>
+ <p>
+ @templ.Raw(p.T("This website is an open project, and a collaboration between developers, translators, and researchers. All source code, data, images, and more for the website are open source and can be found %shere%s. This site is licensed under the BSD 0-Clause license giving you the full freedom to do whatever you would like with any of the content on this site.", linkStart, linkEnd))
+ </p>
+ <h2>{ p.T("Contact Us") }</h2>
+ <p>
+ @templ.Raw(p.T("While we try to stay as up-to-date as possible and to fact check our information, it is always possible that we get something wrong, lack a translation, or are missing some piece of data you may have. In such a case don’t hesitate to contact us; we’ll try to get the site updated or fixed as soon as possible. You are always free to contribute via a git patch if you are more technically included, but if not you can always send an email to %s or contact ‘@onetruemangoman’ on Discord.", contactEmail))
+ </p>
+ <h2>{ p.T("Special Thanks") }</h2>
+ <table>
+ <thead>
+ <th scope="col">{ p.T("Development") }</th>
+ <th scope="col">{ p.T("Research") }</th>
+ <th scope="col">{ p.T("Translations") }</th>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ Jessika Wexler,
+ Lyyli Savolainen,
+ Ralf Nadel
+ </td>
+ <td>
+ Elín Hjartardóttir,
+ Storm Sørensen
+ </td>
+ <td>
+ <span data-tooltip={ p.T("British- & American English") }>Thomas Voss</span>,
+ <span data-tooltip={ p.T("Icelandic") }>Védís Indriðadóttir</span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </main>
+}
diff --git a/templates/about_templ.go b/templates/about_templ.go
new file mode 100644
index 0000000..5a37511
--- /dev/null
+++ b/templates/about_templ.go
@@ -0,0 +1,185 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.2.747
+package templates
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+import "git.thomasvoss.com/euro-cash.eu/i18n"
+
+const (
+ contactEmail = `<a href="mailto:mail@euro-cash.eu">mail@euro-cash.eu</a>`
+ linkStart = `<a href="https://git.thomasvoss.com/www.euro-cash.eu" target="_blank">`
+ linkEnd = `</a>`
+)
+
+func About() templ.Component {
+ return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
+ if !templ_7745c5c3_IsBuffer {
+ defer func() {
+ templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err == nil {
+ templ_7745c5c3_Err = templ_7745c5c3_BufErr
+ }
+ }()
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var1 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var1 == nil {
+ templ_7745c5c3_Var1 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ p := ctx.Value("printer").(i18n.Printer)
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<header>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = navbar().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<h1>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var2 string
+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("About Us"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `about.templ`, Line: 15, Col: 23}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h1></header><main><h2>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var3 string
+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Open Source"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `about.templ`, Line: 18, Col: 26}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h2><p>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templ.Raw(p.T("This website is an open project, and a collaboration between developers, translators, and researchers. All source code, data, images, and more for the website are open source and can be found %shere%s. This site is licensed under the BSD 0-Clause license giving you the full freedom to do whatever you would like with any of the content on this site.", linkStart, linkEnd)).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p><h2>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var4 string
+ templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Contact Us"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `about.templ`, Line: 22, Col: 25}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h2><p>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templ.Raw(p.T("While we try to stay as up-to-date as possible and to fact check our information, it is always possible that we get something wrong, lack a translation, or are missing some piece of data you may have. In such a case don’t hesitate to contact us; we’ll try to get the site updated or fixed as soon as possible. You are always free to contribute via a git patch if you are more technically included, but if not you can always send an email to %s or contact ‘@onetruemangoman’ on Discord.", contactEmail)).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p><h2>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var5 string
+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Special Thanks"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `about.templ`, Line: 26, Col: 29}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h2><table><thead><th scope=\"col\">")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var6 string
+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Development"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `about.templ`, Line: 29, Col: 40}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</th><th scope=\"col\">")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var7 string
+ templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Research"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `about.templ`, Line: 30, Col: 37}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</th><th scope=\"col\">")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var8 string
+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Translations"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `about.templ`, Line: 31, Col: 41}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</th></thead> <tbody><tr><td>Jessika Wexler, Lyyli Savolainen, Ralf Nadel</td><td>Elín Hjartardóttir, Storm Sørensen</td><td><span data-tooltip=\"")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var9 string
+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("British- & American English"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `about.templ`, Line: 45, Col: 61}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">Thomas Voss</span>, <span data-tooltip=\"")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var10 string
+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Icelandic"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `about.templ`, Line: 46, Col: 43}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">Védís Indriðadóttir</span></td></tr></tbody></table></main>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return templ_7745c5c3_Err
+ })
+}
diff --git a/templates/navbar.templ b/templates/navbar.templ
index 8f156e7..4e1d104 100644
--- a/templates/navbar.templ
+++ b/templates/navbar.templ
@@ -24,7 +24,7 @@ templ navbar() {
{ p.T("Discord") }
</a>
</li>
- <li><a href="#TODO">{ p.T("About") }</a></li>
+ <li><a href="/about">{ p.T("About") }</a></li>
<li id="nav-icon-lang">
<a href="/language">
<svg
diff --git a/templates/navbar_templ.go b/templates/navbar_templ.go
index f337657..c2132e1 100644
--- a/templates/navbar_templ.go
+++ b/templates/navbar_templ.go
@@ -120,14 +120,14 @@ func navbar() templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li><li><a href=\"#TODO\">")
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li><li><a href=\"/about\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("About"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `navbar.templ`, Line: 27, Col: 37}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `navbar.templ`, Line: 27, Col: 38}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {