Skip to content

Commit

Permalink
V1.0.1 (#1)
Browse files Browse the repository at this point in the history
* Create pregame.html

* Adding pregame and Updating README

* Pre-game graphic works

Now the pre-game graphic works, you can use this before game start.

* Update README.md

* Post-game graphic works

Now the post-game graphic works, you can use this after the end of the game for sowing the result.

* Update update.php

Aggiunta contollo delle richieste

* Delete gest1.html

* cache bug fix

Now browser cache fixed.

* Update Inning Arrow

Now using 0/1/2 for all variable 0=two dash line 1=top 2=bottom

* Bugfix

Fixed Inning Arrow bug

* LIVE SCOREBOARD

Now the scoreboard updates live.

* Update README.md

Update README.md for the new version.

* Update postgame.html

* Delete of console.log for debugging.

* Update of README.md added Installation and Italian translation
  • Loading branch information
lucafano04 authored Dec 7, 2020
1 parent 6828724 commit c8708cf
Show file tree
Hide file tree
Showing 9 changed files with 259 additions and 113 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

*.json
data.json
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
# Baseball Scoreboard
This is a HTML and JS baseted scoreboard for basball live.

# Installation (English)
Download and unzip the compressed folder
## IMPORTANT
check the file data.json have read and write permission (give it via `chmod 666 data.json`) and make sure update.php have execution rights (Again give it via: `chmod 711 update.php`)

# Installation (Italiano)
Scarica e decomprimi la cartella compressa
## IMPORTANTE
controlla che il file data.json abbia i permessi di lettura e scrittura (forniscilo tramite `chmod 666 data.json`) e assicurati che update.php abbia i diritti di esecuzione (di nuovo dallo:` chmod 711 update.php`)
# UPDATE LOG (English)
## V1.0.1
### New Features:
* LIVE scoreboard: Now scoreboard updates live
* Pre-game and Post-game overlays used for not leaving blank the camera, them will adjust whit name, colour and score (Post-game only)
* Fixed cache with all files now the browser will not cache files
* Ining arrow more reactive (before dash had a problem)
* Removed debug log on console
### Know Bugs:
* we don't find any other bug if you find please advise me
=======
# UPDATE LOG (English)
## V1.0.0
### Features:
Expand All @@ -16,3 +36,33 @@ This is a HTML and JS baseted scoreboard for basball live.
* initial cache about ALL BROWSERS (Just repeat the action for 3/4 times and it's gone)
* Scoreboard don't update live yo have to wait minus then 5s
* we don't find any other bug if you find please advise me
# Update Log (Italiano)
## V1.0.1
### Nuove Funzioni:
* SEGNAPUNTI LIVE: ora il segnapunti si aggiorna in live
* Sovrapposizioni pre-partita e post-partita utilizzate per non lasciare vuota la telecamera, verranno regolate con nome, colore e punteggio (solo dopo la partita)
* Risolto il problema con la cache con tutti i file ora il browser non memorizzerà i file nella cache
* Freccia ining più reattiva (prima il trattino aveva problemi)
* Rimosso il debug log nella console del browser
### Bug conosciuti:
* non troviamo nessun altro bug se trovi per favore avvisami
## V1.0.0
### Funzioni:
* Aggiunta e rimozione punteggio
* Strike, Ball, Out
* Cambio Automatico Battitore
* Grafica occupazione basi
* Reset Ining Automatico
* Ining con Alto/Basso
* Cambio colore e nome delle squadre
* Reset COMPLETO
### Bug conosciuti:
* icache iniziale su TUTTI I BROWSER (Ripeti l'azione per 3/4 volte e non c'è più)
* Il tabellone non si aggiorna dal vivo, devi aspettare meno di 5 secondi
* non troviamo nessun altro bug se trovi per favore avvisami

# LICENCE
[![Licenza Creative Commons](https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png)](http://creativecommons.org/licenses/by-nc-nd/4.0/)
<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Baseball-Scoreboard</span> di [Luca Facchini e Kristian Ceribashi](https://github.com/luca-ceri/) è distribuito con Licenza [Creative Commons Attribuzione - Non commerciale - Non opere derivate 4.0 Internazionale](http://creativecommons.org/licenses/by-nc-nd/4.0/).
Permessi ulteriori rispetto alle finalità della presente licenza possono essere disponibili presso [https://github.com/lucafano04](https://github.com/lucafano04).
=======
2 changes: 1 addition & 1 deletion data.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var data='{"Away":"PESARO","ScoreA":0,"ColorA":"#ff0000","Home":"FANO","ScoreH":0,"ColorH":"#ff8800","Ball":0,"Strike":0,"Out":0,"Ining":1,"bot":null,"b1":false,"b2":false,"b3":false}'
var data='{"Away":"PESARO","ScoreA":0,"ColorA":"#ff0000","Home":"FANO","ScoreH":0,"ColorH":"#ff8800","Ball":0,"Strike":0,"Out":0,"Ining":0,"bot":0,"b1":false,"b2":false,"b3":false}'
22 changes: 0 additions & 22 deletions gest1.html

This file was deleted.

71 changes: 71 additions & 0 deletions postgame.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<html>
<head>
<title>Baseball Scoreboard</title>
<link href="https://fonts.googleapis.com/css2?family=Heebo:wght@800&display=swap" rel="stylesheet">
<meta charset="UTF-8">
<meta name=viewport content="width=device-width, initial-scale=1">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
</head>
<body style="background-color: rgba(0, 0, 0, 0);">
<table class="main">
<tr class="main">
<table>
<tr>
<td>
<svg xmlns="http://www.w3.org/2000/svg" width="310" height="100">
<polygon fill="#F3BC23" stroke="#F3BC23" stroke-width="1" points="0,0 250,0 200,50 0,50" id="labelA"/>
<text id="nameA" x="25" y="37.5" text-anchor="start" fill="white" font-size="30">X</text>
<polygon fill="rgb(41,41,41);" stroke="rgb(41,41,41);" stroke-width="1" points="250,0 200,50 260,50 310,0"/>
<text id="scoreA" x="250" y="37.5" text-anchor="middle" fill="white" font-size="30" font-style="italic">10</text>
</svg>
</td>
<td>
<svg xmlns="http://www.w3.org/2000/svg" width="310" height="100">
<polygon fill="rgb(41,41,41);" stroke="rgb(41,41,41);" stroke-width="1" points="50,0 0,50 60,50 110,0"/>
<text id="scoreH" x="50" y="37.5" text-anchor="middle" fill="white" font-size="30" font-style="italic">10</text>
<polygon fill="#F3BC23" stroke="#F3BC23" stroke-width="1" points="110,0 60,50 310,50 310,0" id="labelH"/>
<text id="nameH" x="285" y="37.5" text-anchor="end" fill="white" font-size="30">X</text>
</svg>
</td>
</tr>
</table>
</tr>
</table>
<!-- SCRIPT VARI-->
<script src="data.json"></script>
<script async=false defer=false>
update()
function load(){
console.log("load start")
let json = document.createElement('script');
json.src = './data.json?'+ Math.random();
json.async = false;
json.defer = false;
document.body.appendChild(json);
console.log("Caricamento terminato")
}
function update(){
console.log("update start")
obj=JSON.parse(data)
nameA.innerHTML=obj.Away;
labelA.style.fill=obj.ColorA;
labelA.style.stroke=obj.ColorA;
scoreA.innerHTML=obj.ScoreA;

nameH.innerHTML= obj.Home;
labelH.style.fill=obj.ColorH;
labelH.style.stroke=obj.ColorH;
scoreH.innerHTML=obj.ScoreH;

console.log("update end")
}
window.setInterval(function(){
load();
setTimeout(function afterTwoSeconds()
{
update()
},500)
}, 10000);
</script>
</body>
</html>
65 changes: 65 additions & 0 deletions pregame.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<html>
<head>
<title>Baseball Scoreboard</title>
<link href="https://fonts.googleapis.com/css2?family=Heebo:wght@800&display=swap" rel="stylesheet">
<meta charset="UTF-8">
<meta name=viewport content="width=device-width, initial-scale=1">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
</head>
<body style="background-color: rgba(0, 0, 0, 0);">
<table class="main">
<tr class="main">
<table>
<tr>
<td>
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="100">
<polygon fill="#F3BC23" stroke="#F3BC23" stroke-width="1" points="0,0 250,0 200,50 0,50" id="labelA"/>
<text id="nameA" x="25" y="37.5" text-anchor="start" fill="white" font-size="30">X</text>
</svg>
</td>
<td>
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="100">
<polygon fill="#F3BC23" stroke="#F3BC23" stroke-width="1" points="50,0 0,50 250,50 250,0" id="labelH"/>
<text id="nameH" x="225" y="37.5" text-anchor="end" fill="white" font-size="30">X</text>
</svg>
</td>
</tr>
</table>
</tr>
</table>
<!-- SCRIPT VARI-->
<script src="data.json"></script>
<script async=false defer=false>
update()
function load(){
console.log("load start")
let json = document.createElement('script');
json.src = './data.json?'+ Math.random();
json.async = false;
json.defer = false;
document.body.appendChild(json);
console.log("Caricamento terminato")
}
function update(){
console.log("update start")
obj=JSON.parse(data)
nameA.innerHTML=obj.Away;
labelA.style.fill=obj.ColorA;
labelA.style.stroke=obj.ColorA;

nameH.innerHTML= obj.Home;
labelH.style.fill=obj.ColorH;
labelH.style.stroke=obj.ColorH;

console.log("update end")
}
window.setInterval(function(){
load();
setTimeout(function afterTwoSeconds()
{
update()
},500)
}, 10000);
</script>
</body>
</html>
36 changes: 16 additions & 20 deletions scoreboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,16 @@
<!-- SCRIPT VARI-->
<script src="data.json"></script>
<script async=false defer=false>
load()
update()
function load(){
console.log("load start")
let json = document.createElement('script');
json.src = './data.json?'+ Math.random();
json.async = false;
json.defer = false;
document.body.appendChild(json);
console.log("Caricamento terminato")
}
function update(){
console.log("update start")
obj=JSON.parse(data)
document.getElementById("Away").innerHTML= obj.Away;
document.getElementById("ScoreA").innerHTML=obj.ScoreA;
Expand All @@ -64,39 +62,37 @@
document.getElementById("Ball").innerHTML= obj.Ball;
document.getElementById("Out").innerHTML= obj.Out;
document.getElementById("Num").innerHTML= obj.Ining;
if (obj.bot == true) {
document.getElementById("Arrow").style="transform: rotate(90deg);";
}else if(obj.bot == false){
document.getElementById("Arrow").style="transform: rotate(270deg);";
}else if(obj.bot == null){
if(obj.bot == 0){
document.getElementById("Arrow").style="transform: rotate(0deg);";
document.getElementById("Arrow").innerHTML="&mdash;";
document.getElementById("Num").innerHTML="&mdash;";
}else if (obj.bot == 1) {
document.getElementById("Arrow").style="transform: rotate(90deg);";
document.getElementById("Arrow").innerHTML="&#10148;";
}else if(obj.bot == 2){
document.getElementById("Arrow").style="transform: rotate(270deg);";
document.getElementById("Arrow").innerHTML="&#10148;";
}
if (obj.b1) {
if (obj.b1)
document.getElementById("b1").style="background-color: rgb(255, 115, 0);";
}else{
else
document.getElementById("b1").style="background-color: rgba(0,0,0,0);";
}
if (obj.b2) {
if (obj.b2)
document.getElementById("b2").style="background-color: rgb(255, 115, 0);";
}else{
else
document.getElementById("b2").style="background-color: rgba(0,0,0,0);";
}
if (obj.b3) {
if (obj.b3)
document.getElementById("b3").style="background-color: rgb(255, 115, 0);";
}else{
else
document.getElementById("b3").style="background-color: rgba(0,0,0,0);";
}
console.log("update end")
}
window.setInterval(function(){
load();
setTimeout(function afterTwoSeconds()
{
update()
},500)
}, 10000);
},100)
}, 1500);
</script>
</body>
</html>
Loading

0 comments on commit c8708cf

Please sign in to comment.