Fix bug where column headings were displayed incorrectly on small screens

This commit is contained in:
Justin Hawkins 2022-06-07 19:59:33 +09:30
parent ffcf7c0438
commit 4422f3840e
2 changed files with 4 additions and 3 deletions

View File

@ -1,3 +1,3 @@
<th hx-post="/manage/results?sort={{ .URLString }}" hx-target="#manage-results">{{ .Name }}&nbsp;{{ .TitleArrow }}
<th class="{{ .Class }}" hx-post="/manage/results?sort={{ .URLString }}" hx-target="#manage-results">{{ .Name }}&nbsp;{{ .TitleArrow }}
</th>

View File

@ -46,6 +46,7 @@ type ColumnInfo struct {
Name string
Param string
Sorted string
Class string
}
func (c ColumnInfo) URLString() string {
@ -123,8 +124,8 @@ func Create(bmm *db.BookmarkManager, cmm *db.ConfigManager) *Server {
meta := gin.H{"config": config, "bookmarks": allBookmarks}
colTitle := &ColumnInfo{Name: "Title/URL", Param: "title"}
colCreated := &ColumnInfo{Name: "Created", Param: "created"}
colScraped := &ColumnInfo{Name: "Scraped", Param: "scraped"}
colCreated := &ColumnInfo{Name: "Created", Param: "created", Class: "show-for-large"}
colScraped := &ColumnInfo{Name: "Scraped", Param: "scraped", Class: "show-for-large"}
if sort == "title" {
colTitle.Sorted = "asc"
}