Skip to content

Commit

Permalink
Update favicon to new logo from bb-storage
Browse files Browse the repository at this point in the history
  • Loading branch information
moroten committed Oct 20, 2023
1 parent daafd4f commit 2dc524d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/bb_browser/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ go_library(
"main.go",
],
embedsrcs = [
"favicon.png",
"stylesheet.css",
"templates/error.html",
"templates/footer.html",
Expand Down Expand Up @@ -45,6 +44,7 @@ go_library(
"@com_github_buildbarn_bb_storage//pkg/filesystem/path",
"@com_github_buildbarn_bb_storage//pkg/global",
"@com_github_buildbarn_bb_storage//pkg/http",
"@com_github_buildbarn_bb_storage//pkg/logo",
"@com_github_buildbarn_bb_storage//pkg/program",
"@com_github_buildbarn_bb_storage//pkg/proto/auth",
"@com_github_buildbarn_bb_storage//pkg/proto/fsac",
Expand Down
Binary file removed cmd/bb_browser/favicon.png
Binary file not shown.
5 changes: 2 additions & 3 deletions cmd/bb_browser/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/buildbarn/bb-storage/pkg/digest"
"github.com/buildbarn/bb-storage/pkg/global"
"github.com/buildbarn/bb-storage/pkg/http"
"github.com/buildbarn/bb-storage/pkg/logo"
"github.com/buildbarn/bb-storage/pkg/program"
auth_pb "github.com/buildbarn/bb-storage/pkg/proto/auth"
"github.com/buildbarn/bb-storage/pkg/proto/iscc"
Expand Down Expand Up @@ -55,8 +56,6 @@ var (
templatesFS embed.FS
//go:embed stylesheet.css
stylesheet template.CSS
//go:embed favicon.png
favicon []byte
)

func main() {
Expand Down Expand Up @@ -130,7 +129,7 @@ func main() {
routePrefix += "/"
}

faviconURL := template.URL("data:image/png;base64," + base64.StdEncoding.EncodeToString(favicon))
faviconURL := template.URL("data:image/svg+xml;base64," + base64.StdEncoding.EncodeToString(logo.FaviconSvg))
templates, err := template.New("templates").Funcs(template.FuncMap{
"basename": path.Base,
"favicon_url": func() template.URL { return faviconURL },
Expand Down

0 comments on commit 2dc524d

Please sign in to comment.