From 3510a3590ab02ed6148e67c12ecd63f8319bd726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Kesim?= Date: Fri, 8 Nov 2024 16:38:29 +0100 Subject: [PATCH] table: column and row header while scrolling --- table.tmpl | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/table.tmpl b/table.tmpl index a687df3..774bfa6 100644 --- a/table.tmpl +++ b/table.tmpl @@ -11,8 +11,24 @@ body { } table { background: white; - border-collapse: collapse; + table-layout: fixed; + border-collapse: separate; + border-spacing: 0; + border: 1px solid grey; } +table thead th { + position: sticky; + background: #ffe; + top: 0; + z-index: 2; +} +table tbody th { + position: sticky; + left: 0; + background: #ffe; + z-index: 1; +} + th, td { padding: 8px; border: 1px solid #ddd; @@ -27,7 +43,7 @@ th.side { max-width: 11em; } tr:hover { - background: #efefef; + background: #eee; } .feature { background: powderblue; @@ -97,6 +113,7 @@ details[open].issue { {{- range $top.Tags -}}{{- end -}} + {{- range $version := $versions }} @@ -111,6 +128,8 @@ details[open].issue { {{- end}} + + {{- range $cat := $top.Categories }} @@ -153,6 +172,7 @@ details[open].issue { {{ end }} {{- end}} +
{{ . }}

Total: {{ len $features }} features and {{ len $issues }} issues.