Skip to content

Commit

Permalink
serve favicon from server (issue #43)
Browse files Browse the repository at this point in the history
  • Loading branch information
kprevas committed Apr 18, 2020
1 parent 436f2c2 commit c346dc7
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 22 deletions.
3 changes: 1 addition & 2 deletions draft.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<html>
<head>
<title>not for ulb nope</title>
<link href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAACQFBMVEUAAAAZGhgVFhQbGxkXGBUaGxkaGhgOEQ4SExEdHhscHBrkHnHnNoHnLnzmUY+iMWCpPWrnU5HmJnjmK3zjG3DmLnzlKHnkH3Lx///rhK7gGm7nT4/lEWzmHXHoYZjjIXIREQ90H0JzGD4AEgMLCwoODQwVGRVPGy/pX5vrh7NEGSoXGRYXFxUWFxQWFxUVGRSZGUzlAWHmFm7YHGwWFhQUFBLnIXXmGXDnNYHnOoTnI3bnJXcZGhgYGhcWFxUYGxgWGhYYGxgfGRogExcAAAAjGBscGhkWGxfnKXnnP4XmMn1RIDPATn3pVZXpNIbeXpOfPWYAAADqPIXmPoXmJHbhAE7oVJHoUZDsRYfmfo7pVYLnbpTpKHnpZpvnSYriAFToWJPrjLHrfo3kk1PrhazrkbPqeqfnQ4fnPoXqiq7oWJPgABnnRIjriK7rgqvnR4rQAADfHnDZUIjZb5rYaZbSRoC/CFYXFhUUGBQGEQpqK0TTkK3tvNHRjqtsKkUGEgsVGBUXFhUWFhQXGBYXGRZHFinkKHnrh7Lrk7rjInYtEhwYGRcYGBYWFhQUFRMWFxXoU5PsoMHsqcfpYpwXFxUUFBLjAErmL33nNYHmDGjqfajkh6Xhi5zpe6fqjbDTnzXjlUvsf4nXpivrm7jrl7DtinbrgJDqhqvtg3vskpbrm7nrmbfrjK/rkbTocKXkN4DkOIDpfa3rl7rrgqrmwNHv1eHpgK3peanv2OPmx9XtvNLtvtLtuc7v2+Xv3+f///+A7AbLAAAAmnRSTlMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdDQEgB0WhJgKBhhEdaixRv3Mns5cLQW4cBqKfeOWr1UnFiwek9PT+9PzsW2D8owRp/fZ9AQ9p1NNZCRMqO3bs/uV6Pi0VFTAoET3FzjEPJS4UBwpS6/VqBwcDNUEJ2afRigAAAAFiS0dEv9Pbs1UAAAAHdElNRQfkBAUAMzvGPynSAAAAanRFWHRSYXcgcHJvZmlsZSB0eXBlIGFwcDEACmFwcDEKICAgICAgMzQKNDk0OTJhMDAwODAwMDAwMDAxMDAzMTAxMDIwMDA3MDAwMDAwMWEwMDAwMDAwMDAwMDAwMDUwNjk2MzYxNzM2MTAwMDAK3JU+DAAAAO5JREFUGNNjYMAGGJmYmVlY2djYoXwOJk4bWzt7B1YuEI+bh5eP39HJ2cXVzV1AUEiYQUTUw9PL28fXzz8gMCg4RIxBPDRsVnjE7MioOdExsXPjJBi44xPmJSbNX7BwUXJKalq6JIOUdEbm4iVLly1fsXLV6qxsGQZZuZzcNWvXrd+wcdPmvPwCeQYFxcKi4i1bt23fsbOktExJmUGlvKKyqnrX7j01tXX1DY0KDKpNzS2tbe1793V0dnX39DIwMPX1q6lrTJg4abKmlvaUqToMukx6+gaG06bPmGlkbGJiqgPxjZm5haWVNVaPMwAAEgpHgZWroR0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDQtMDVUMDA6NTE6NDkrMDA6MDAQ6jpTAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA0LTA1VDAwOjUxOjQ5KzAwOjAwYbeC7wAAAABJRU5ErkJggg=="
rel="icon">
<link href="static/favicon.png" rel="icon">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.card {
Expand Down
9 changes: 4 additions & 5 deletions index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
<html>
<head>
<title>not for ulb nope</title>
<link href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAACQFBMVEUAAAAZGhgVFhQbGxkXGBUaGxkaGhgOEQ4SExEdHhscHBrkHnHnNoHnLnzmUY+iMWCpPWrnU5HmJnjmK3zjG3DmLnzlKHnkH3Lx///rhK7gGm7nT4/lEWzmHXHoYZjjIXIREQ90H0JzGD4AEgMLCwoODQwVGRVPGy/pX5vrh7NEGSoXGRYXFxUWFxQWFxUVGRSZGUzlAWHmFm7YHGwWFhQUFBLnIXXmGXDnNYHnOoTnI3bnJXcZGhgYGhcWFxUYGxgWGhYYGxgfGRogExcAAAAjGBscGhkWGxfnKXnnP4XmMn1RIDPATn3pVZXpNIbeXpOfPWYAAADqPIXmPoXmJHbhAE7oVJHoUZDsRYfmfo7pVYLnbpTpKHnpZpvnSYriAFToWJPrjLHrfo3kk1PrhazrkbPqeqfnQ4fnPoXqiq7oWJPgABnnRIjriK7rgqvnR4rQAADfHnDZUIjZb5rYaZbSRoC/CFYXFhUUGBQGEQpqK0TTkK3tvNHRjqtsKkUGEgsVGBUXFhUWFhQXGBYXGRZHFinkKHnrh7Lrk7rjInYtEhwYGRcYGBYWFhQUFRMWFxXoU5PsoMHsqcfpYpwXFxUUFBLjAErmL33nNYHmDGjqfajkh6Xhi5zpe6fqjbDTnzXjlUvsf4nXpivrm7jrl7DtinbrgJDqhqvtg3vskpbrm7nrmbfrjK/rkbTocKXkN4DkOIDpfa3rl7rrgqrmwNHv1eHpgK3peanv2OPmx9XtvNLtvtLtuc7v2+Xv3+f///+A7AbLAAAAmnRSTlMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdDQEgB0WhJgKBhhEdaixRv3Mns5cLQW4cBqKfeOWr1UnFiwek9PT+9PzsW2D8owRp/fZ9AQ9p1NNZCRMqO3bs/uV6Pi0VFTAoET3FzjEPJS4UBwpS6/VqBwcDNUEJ2afRigAAAAFiS0dEv9Pbs1UAAAAHdElNRQfkBAUAMzvGPynSAAAAanRFWHRSYXcgcHJvZmlsZSB0eXBlIGFwcDEACmFwcDEKICAgICAgMzQKNDk0OTJhMDAwODAwMDAwMDAxMDAzMTAxMDIwMDA3MDAwMDAwMWEwMDAwMDAwMDAwMDAwMDUwNjk2MzYxNzM2MTAwMDAK3JU+DAAAAO5JREFUGNNjYMAGGJmYmVlY2djYoXwOJk4bWzt7B1YuEI+bh5eP39HJ2cXVzV1AUEiYQUTUw9PL28fXzz8gMCg4RIxBPDRsVnjE7MioOdExsXPjJBi44xPmJSbNX7BwUXJKalq6JIOUdEbm4iVLly1fsXLV6qxsGQZZuZzcNWvXrd+wcdPmvPwCeQYFxcKi4i1bt23fsbOktExJmUGlvKKyqnrX7j01tXX1DY0KDKpNzS2tbe1793V0dnX39DIwMPX1q6lrTJg4abKmlvaUqToMukx6+gaG06bPmGlkbGJiqgPxjZm5haWVNVaPMwAAEgpHgZWroR0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDQtMDVUMDA6NTE6NDkrMDA6MDAQ6jpTAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA0LTA1VDAwOjUxOjQ5KzAwOjAwYbeC7wAAAABJRU5ErkJggg=="
rel="icon">
<link href="static/favicon.png" rel="icon">
</head>
<body>
<div>
<div>drafts</div>
<ul>
<div>
<div>drafts</div>
<ul>
{{ range .Drafts }}
<li>
{{ if .Joined }}
Expand Down
5 changes: 2 additions & 3 deletions librarian.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
<html>
<head>
<title>not for ulb nope</title>
<link href="data:image/png;base64,iVBORw0K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9AQ9p1NNZCRMqO3bs/uV6Pi0VFTAoET3FzjEPJS4UBwpS6/VqBwcDNUEJ2afRigAAAAFiS0dEv9Pbs1UAAAAHdElNRQfkBAUAMzvGPynSAAAAanRFWHRSYXcgcHJvZmlsZSB0eXBlIGFwcDEACmFwcDEKICAgICAgMzQKNDk0OTJhMDAwODAwMDAwMDAxMDAzMTAxMDIwMDA3MDAwMDAwMWEwMDAwMDAwMDAwMDAwMDUwNjk2MzYxNzM2MTAwMDAK3JU+DAAAAO5JREFUGNNjYMAGGJmYmVlY2djYoXwOJk4bWzt7B1YuEI+bh5eP39HJ2cXVzV1AUEiYQUTUw9PL28fXzz8gMCg4RIxBPDRsVnjE7MioOdExsXPjJBi44xPmJSbNX7BwUXJKalq6JIOUdEbm4iVLly1fsXLV6qxsGQZZuZzcNWvXrd+wcdPmvPwCeQYFxcKi4i1bt23fsbOktExJmUGlvKKyqnrX7j01tXX1DY0KDKpNzS2tbe1793V0dnX39DIwMPX1q6lrTJg4abKmlvaUqToMukx6+gaG06bPmGlkbGJiqgPxjZm5haWVNVaPMwAAEgpHgZWroR0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDQtMDVUMDA6NTE6NDkrMDA6MDAQ6jpTAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA0LTA1VDAwOjUxOjQ5KzAwOjAwYbeC7wAAAABJRU5ErkJggg=="
rel="icon">
<link href="static/favicon.png" rel="icon">
</head>
<body>
<div>draft id: {{ .DraftId }}</div>
<div>draft id: {{ .DraftId }}</div>
<div>
{{ if not .Pack }}
<div>no packs available</div>
Expand Down
3 changes: 1 addition & 2 deletions login.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<html>
<head>
<title>r38 login</title>
<link href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgA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UAMzvGPynSAAAAanRFWHRSYXcgcHJvZmlsZSB0eXBlIGFwcDEACmFwcDEKICAgICAgMzQKNDk0OTJhMDAwODAwMDAwMDAxMDAzMTAxMDIwMDA3MDAwMDAwMWEwMDAwMDAwMDAwMDAwMDUwNjk2MzYxNzM2MTAwMDAK3JU+DAAAAO5JREFUGNNjYMAGGJmYmVlY2djYoXwOJk4bWzt7B1YuEI+bh5eP39HJ2cXVzV1AUEiYQUTUw9PL28fXzz8gMCg4RIxBPDRsVnjE7MioOdExsXPjJBi44xPmJSbNX7BwUXJKalq6JIOUdEbm4iVLly1fsXLV6qxsGQZZuZzcNWvXrd+wcdPmvPwCeQYFxcKi4i1bt23fsbOktExJmUGlvKKyqnrX7j01tXX1DY0KDKpNzS2tbe1793V0dnX39DIwMPX1q6lrTJg4abKmlvaUqToMukx6+gaG06bPmGlkbGJiqgPxjZm5haWVNVaPMwAAEgpHgZWroR0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDQtMDVUMDA6NTE6NDkrMDA6MDAQ6jpTAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA0LTA1VDAwOjUxOjQ5KzAwOjAwYbeC7wAAAABJRU5ErkJggg=="
rel="icon">
<link href="static/favicon.png" rel="icon">
</head>
<body>

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func NewHandler(useAuth bool) http.Handler {
mux.HandleFunc("/auth/google/callback", oauthGoogleCallback)

fs := http.FileServer(http.Dir("static"))
mux.Handle("/static/", middleware(http.StripPrefix("/static/", fs)))
mux.Handle("/static/", http.StripPrefix("/static/", fs))

addHandler := func(route string, serveFunc r38handler) {
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand Down
17 changes: 8 additions & 9 deletions replay.tmpl
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<!doctype html>
<head>
<title>DraftSim</title>
<link href="data:image/png;base64,iVBORw0KGgoAAA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p1NNZCRMqO3bs/uV6Pi0VFTAoET3FzjEPJS4UBwpS6/VqBwcDNUEJ2afRigAAAAFiS0dEv9Pbs1UAAAAHdElNRQfkBAUAMzvGPynSAAAAanRFWHRSYXcgcHJvZmlsZSB0eXBlIGFwcDEACmFwcDEKICAgICAgMzQKNDk0OTJhMDAwODAwMDAwMDAxMDAzMTAxMDIwMDA3MDAwMDAwMWEwMDAwMDAwMDAwMDAwMDUwNjk2MzYxNzM2MTAwMDAK3JU+DAAAAO5JREFUGNNjYMAGGJmYmVlY2djYoXwOJk4bWzt7B1YuEI+bh5eP39HJ2cXVzV1AUEiYQUTUw9PL28fXzz8gMCg4RIxBPDRsVnjE7MioOdExsXPjJBi44xPmJSbNX7BwUXJKalq6JIOUdEbm4iVLly1fsXLV6qxsGQZZuZzcNWvXrd+wcdPmvPwCeQYFxcKi4i1bt23fsbOktExJmUGlvKKyqnrX7j01tXX1DY0KDKpNzS2tbe1793V0dnX39DIwMPX1q6lrTJg4abKmlvaUqToMukx6+gaG06bPmGlkbGJiqgPxjZm5haWVNVaPMwAAEgpHgZWroR0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDQtMDVUMDA6NTE6NDkrMDA6MDAQ6jpTAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA0LTA1VDAwOjUxOjQ5KzAwOjAwYbeC7wAAAABJRU5ErkJggg=="
rel="icon">
</head>
<body>
<div id="app"></div>
</body>
<script>window.DraftString={{ .Json }};</script>
<head>
<title>DraftSim</title>
<link href="static/favicon.png" rel="icon">
</head>
<body>
<div id="app"></div>
</body>
<script>window.DraftString ={{ .Json }};</script>
<script src="/static/dist/app.bundle.js"></script>
</html>
Binary file added static/favicon.png
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 c346dc7

Please sign in to comment.