Compare commits

...

2 Commits

Author SHA1 Message Date
965d2c87f5 Problem: tags are not very visible
All checks were successful
continuous-integration/drone/push Build is passing
Solution: improve visibility of tags with a bit of color
2022-01-15 16:35:57 +01:00
d22f3e123a Problem: TODO and DONE are shown a normal text links
Solution: Replace TODO and DONE tags with checkboxes
2022-01-15 16:31:47 +01:00
3 changed files with 15 additions and 4 deletions

View File

@ -664,3 +664,10 @@ input.input-line, input.input-line:active {
.search.input.is-error { .search.input.is-error {
outline: red solid 4px; outline: red solid 4px;
} }
.tag {
background: #deeeee;
color: #444;
border-radius: 3px;
padding: 2px 4px;
}

View File

@ -937,8 +937,16 @@ func renderLinks(pageText string, edit bool) string {
s = strings.TrimSuffix(s, "]]") s = strings.TrimSuffix(s, "]]")
s = strings.TrimSpace(s) s = strings.TrimSpace(s)
if tag { if tag {
switch s {
case "TODO":
return fmt.Sprint(`[ ] `)
case "DONE":
return fmt.Sprint(`[X] `)
default:
return fmt.Sprintf(`<a href=%q class="tag">%s</a>`, cleanNameURL(s), s) return fmt.Sprintf(`<a href=%q class="tag">%s</a>`, cleanNameURL(s), s)
}
} }
editPart := "" editPart := ""
if edit { if edit {
editPart = "edit/" editPart = "edit/"

View File

@ -44,9 +44,5 @@
.edit { .edit {
color: red; color: red;
} }
.tag {
color: #444;
}
</style> </style>
{{ end }} {{ end }}