diff options
author | Thomas Voss <mail@thomasvoss.com> | 2025-08-04 11:04:26 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2025-08-04 11:04:26 +0200 |
commit | 61266338e212400ce3157b304db0c226683a8ecd (patch) | |
tree | f31615d3cf60b9e7eba9f614aa4c610a9417c514 /src | |
parent | 120917aff0af1c275088a6df51c2b8909e319c80 (diff) |
Make the first table columns sticky
Diffstat (limited to 'src')
-rw-r--r-- | src/templates/coins-mintages.html.tmpl | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/templates/coins-mintages.html.tmpl b/src/templates/coins-mintages.html.tmpl index ee8bc75..7c041f3 100644 --- a/src/templates/coins-mintages.html.tmpl +++ b/src/templates/coins-mintages.html.tmpl @@ -2,8 +2,13 @@ {{ template "header-navbar" . }} <style> - #mintage-table #mintage-table-cc { + .mintage-table { white-space: nowrap; + + tr :is(th, td):first-child { + position: sticky; + left: 0; + } } label[for="country-dd"] { display: none; } @@ -99,7 +104,7 @@ <div class="overflow-auto"> {{ if eq .FilterBy "country" }} - <table id="mintage-table-country" class="striped" role="grid"> + <table class="mintage-table striped" role="grid"> <thead> <th>{{ .GetC "Year" "Header/Label" }}</th> <th data-numeric>{{ .Printer.Ftom 0.01 }}</th> @@ -131,7 +136,7 @@ {{ else if eq .FilterBy "year" }} - <table id="mintage-table-year" class="striped" role="grid"> + <table class="mintage-table striped" role="grid"> <thead> <th>{{ .GetC "Country" "Header/Label" }}</th> <th data-numeric>{{ .Printer.Ftom 0.01 }}</th> @@ -168,7 +173,7 @@ {{ if ne (len .CountryMintages.Commemorative) 0 }} <figure> <figcaption>{{ .Get "Commemorative Coins" }}</figcaption> - <table id="mintage-table-cc" class="striped" role="grid"> + <table class="mintage-table striped" role="grid"> <thead> <th>{{ .GetC "Year" "Header/Label" }}</th> <th>{{ .GetC "Commemorated Topic" "Header/Label" }}</th> @@ -201,7 +206,7 @@ {{ if ne (len .YearMintages.Commemorative) 0 }} <figure> <figcaption>{{ .Get "Commemorative Coins" }}</figcaption> - <table id="mintage-table-cc" class="striped" role="grid"> + <table class="mintage-table striped" role="grid"> <thead> <th>{{ .GetC "Country" "Header/Label" }}</th> <th>{{ .GetC "Commemorated Topic" "Header/Label" }}</th> @@ -275,4 +280,4 @@ {{ else }} <td data-numeric>{{ $p.Itoa $v }}</td> {{ end }} -{{ end }}
\ No newline at end of file +{{ end }} |