Skip to content

Commit

Permalink
Fix the web site favicon
Browse files Browse the repository at this point in the history
It has been broken since 2021-09-09,
commit c4d0a62.

- The wrong base64 encoding was applied.
- Use "icon" instead of deprecated "shurtcut icon",
  see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel#icon
  • Loading branch information
moroten authored and EdSchouten committed Sep 17, 2023
1 parent 881fd82 commit daafd4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/bb_browser/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func main() {
routePrefix += "/"
}

faviconURL := template.URL("data:image/png;base64," + base64.URLEncoding.EncodeToString(favicon))
faviconURL := template.URL("data:image/png;base64," + base64.StdEncoding.EncodeToString(favicon))
templates, err := template.New("templates").Funcs(template.FuncMap{
"basename": path.Base,
"favicon_url": func() template.URL { return faviconURL },
Expand Down
2 changes: 1 addition & 1 deletion cmd/bb_browser/templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>Buildbarn Browser</title>
<link href="{{favicon_url}}" rel="shortcut icon">
<link href="{{favicon_url}}" rel="icon">
<style>{{stylesheet}}</style>
</head>
<body>
Expand Down

0 comments on commit daafd4f

Please sign in to comment.