From 334a4ffe59286c0ca1d605b9a89155cbf2aa1eae Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 3 Aug 2025 02:29:50 +0200 Subject: Improve table styling on mobile --- src/templates.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/templates.go') diff --git a/src/templates.go b/src/templates.go index 2721f92..a553766 100644 --- a/src/templates.go +++ b/src/templates.go @@ -120,7 +120,10 @@ func ifElse(b bool, x, y any) any { return y } -func withTranslation(tag, bcp, text string, trans template.HTML) template.HTML { +func withTranslation(tag, bcp, text string, trans template.HTML, + spanAttrs ...string) template.HTML { + name, _, _ := strings.Cut(tag, " ") + var bob strings.Builder bob.WriteByte('<') bob.WriteString(tag) @@ -131,13 +134,18 @@ func withTranslation(tag, bcp, text string, trans template.HTML) template.HTML { bob.WriteString("") if text != string(trans) { - bob.WriteString(`
`) + bob.WriteString(`
') bob.WriteString(string(trans)) bob.WriteString("") } bob.WriteString("') return template.HTML(bob.String()) } -- cgit v1.2.3