Skip to content

Commit ab5656d

Browse files
committed
Add Buildbarn logo svg
1 parent ba53c0a commit ab5656d

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed

pkg/logo/BUILD.bazel

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
load("@io_bazel_rules_go//go:def.bzl", "go_library")
2+
3+
# Minify the logo into a favicon.
4+
genrule(
5+
name = "favicon",
6+
srcs = [":buildbarn_logo.svg"],
7+
outs = ["favicon.svg"],
8+
# Remove embedded draw.io content attribute and svg comments.
9+
cmd = "tr -d '\n' < $(location :buildbarn_logo.svg) | sed -e 's/ content=\"[^\"]*\"//' -e 's/<!--[^!]*-->//g' > $@",
10+
)
11+
12+
go_library(
13+
name = "logo",
14+
srcs = ["logo.go"],
15+
embedsrcs = [
16+
"favicon.svg",
17+
],
18+
importpath = "github.com/buildbarn/bb-storage/pkg/logo",
19+
visibility = ["//visibility:public"],
20+
)

pkg/logo/buildbarn_logo.png

18.3 KB
Loading

pkg/logo/buildbarn_logo.svg

+21
Loading

pkg/logo/logo.go

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package logo
2+
3+
import (
4+
_ "embed" // For "go:embed".
5+
)
6+
7+
//go:embed favicon.svg
8+
var faviconSvg []byte
9+
10+
// FaviconSvg holds the Buildbarn logo and can be used as favicon in web browsers.
11+
var FaviconSvg = faviconSvg

0 commit comments

Comments
 (0)