Skip to content

Commit

Permalink
feat: make logo and add favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
macrat committed Apr 10, 2021
1 parent a2e8596 commit 4c075c2
Show file tree
Hide file tree
Showing 6 changed files with 373 additions and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Ayd?
====
<img src="./assets/logo.svg" style="display: block; margin: auto" />

Easiest status page to check something service is dead:skull: or alive:heavy_check_mark:.

Expand Down
354 changes: 354 additions & 0 deletions assets/logo-design.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions exporter/exporter.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
package exporter

import (
_ "embed"
"net/http"

"github.com/macrat/ayd/store"
)

//go:embed static/favicon.ico
var faviconIco []byte

//go:embed static/favicon.svg
var faviconSvg []byte

func New(s *store.Store) http.Handler {
m := http.NewServeMux()

m.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
w.Write(faviconIco)
})
m.HandleFunc("/favicon.svg", func(w http.ResponseWriter, r *http.Request) {
w.Write(faviconSvg)
})

m.HandleFunc("/status.txt", TextExporter(s))
m.HandleFunc("/status.json", JSONExporter(s))

Expand Down
Binary file added exporter/static/favicon.ico
Binary file not shown.
2 changes: 2 additions & 0 deletions exporter/static/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4c075c2

Please sign in to comment.