mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 13:46:44 -04:00
Tweak logo sizes and positions.
This commit is contained in:
@@ -44,6 +44,7 @@ body[data-mode=timeout] .mode#match {
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
height: 80%;
|
||||||
margin: auto auto;
|
margin: auto auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,11 +111,11 @@ html {
|
|||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
top: 30px;
|
top: 30px;
|
||||||
height: 85px;
|
height: 80px;
|
||||||
}
|
}
|
||||||
#matchTime {
|
#matchTime {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 1px;
|
top: 11px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
color: #222;
|
color: #222;
|
||||||
font-family: "FuturaLTBold";
|
font-family: "FuturaLTBold";
|
||||||
@@ -203,8 +203,8 @@ html {
|
|||||||
}
|
}
|
||||||
#blindsLogo {
|
#blindsLogo {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 37px;
|
top: 65px;
|
||||||
height: 185px;
|
height: 160px;
|
||||||
}
|
}
|
||||||
#finalScore {
|
#finalScore {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 345 KiB |
@@ -23,7 +23,7 @@ var overlayCenteringTopHideParams = {queue: false, top: overlayCenteringTopUp};
|
|||||||
var overlayCenteringTopShowParams = {queue: false, top: "50px"};
|
var overlayCenteringTopShowParams = {queue: false, top: "50px"};
|
||||||
var eventMatchInfoDown = "30px";
|
var eventMatchInfoDown = "30px";
|
||||||
var eventMatchInfoUp = $("#eventMatchInfo").css("height");
|
var eventMatchInfoUp = $("#eventMatchInfo").css("height");
|
||||||
var logoUp = "10px";
|
var logoUp = "15px";
|
||||||
var logoDown = $("#logo").css("top");
|
var logoDown = $("#logo").css("top");
|
||||||
var scoreIn = $(".score").css("width");
|
var scoreIn = $(".score").css("width");
|
||||||
var scoreMid = "135px";
|
var scoreMid = "135px";
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ package web
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
|
||||||
"github.com/Team254/cheesy-arena/field"
|
"github.com/Team254/cheesy-arena/field"
|
||||||
"github.com/Team254/cheesy-arena/game"
|
"github.com/Team254/cheesy-arena/game"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
@@ -87,17 +86,16 @@ func (web *Web) getScoresHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (web *Web) setScoresHandler(w http.ResponseWriter, r *http.Request) {
|
func (web *Web) setScoresHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
if web.arena.MatchState == field.PreMatch || web.arena.MatchState == field.TimeoutActive || web.arena.MatchState == field.PostTimeout {
|
if web.arena.MatchState == field.PreMatch || web.arena.MatchState == field.TimeoutActive ||
|
||||||
fmt.Fprintf(w, "Score cannot be updated in this match state")
|
web.arena.MatchState == field.PostTimeout {
|
||||||
w.WriteHeader(http.StatusNotAcceptable)
|
http.Error(w, "Score cannot be updated in this match state", http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var scores jsonScore
|
var scores jsonScore
|
||||||
reqBody, err := ioutil.ReadAll(r.Body)
|
reqBody, err := ioutil.ReadAll(r.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(w, "Score data missing")
|
handleWebErr(w, err)
|
||||||
w.WriteHeader(http.StatusNoContent)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
json.Unmarshal(reqBody, &scores)
|
json.Unmarshal(reqBody, &scores)
|
||||||
@@ -114,6 +112,4 @@ func (web *Web) setScoresHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
web.arena.BlueScore.TeleopPoints += scores.Blue.Teleop
|
web.arena.BlueScore.TeleopPoints += scores.Blue.Teleop
|
||||||
web.arena.BlueScore.EndgamePoints += scores.Blue.Endgame
|
web.arena.BlueScore.EndgamePoints += scores.Blue.Endgame
|
||||||
web.arena.RealtimeScoreNotifier.Notify()
|
web.arena.RealtimeScoreNotifier.Notify()
|
||||||
|
|
||||||
w.WriteHeader(http.StatusOK)
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ func TestPatchScores(t *testing.T) {
|
|||||||
|
|
||||||
web.arena.MatchState = field.PreMatch
|
web.arena.MatchState = field.PreMatch
|
||||||
recorder = web.patchHttpResponse("/api/scores", "{}")
|
recorder = web.patchHttpResponse("/api/scores", "{}")
|
||||||
assert.Equal(t, 200, recorder.Code)
|
assert.Equal(t, 400, recorder.Code)
|
||||||
assert.Equal(t, recorder.Body.String(), "Score cannot be updated in this match state")
|
assert.Equal(t, "Score cannot be updated in this match state\n", recorder.Body.String())
|
||||||
|
|
||||||
score1 := game.TestScore1()
|
score1 := game.TestScore1()
|
||||||
score2 := game.TestScore2()
|
score2 := game.TestScore2()
|
||||||
@@ -85,8 +85,8 @@ func TestPutScores(t *testing.T) {
|
|||||||
|
|
||||||
web.arena.MatchState = field.PreMatch
|
web.arena.MatchState = field.PreMatch
|
||||||
recorder = web.putHttpResponse("/api/scores", "{}")
|
recorder = web.putHttpResponse("/api/scores", "{}")
|
||||||
assert.Equal(t, 200, recorder.Code)
|
assert.Equal(t, 400, recorder.Code)
|
||||||
assert.Equal(t, recorder.Body.String(), "Score cannot be updated in this match state")
|
assert.Equal(t, "Score cannot be updated in this match state\n", recorder.Body.String())
|
||||||
|
|
||||||
score1 := game.TestScore1()
|
score1 := game.TestScore1()
|
||||||
score2 := game.TestScore2()
|
score2 := game.TestScore2()
|
||||||
|
|||||||
Reference in New Issue
Block a user