From ad80ecff07070e1db01cb0f6312f33e979eeec84 Mon Sep 17 00:00:00 2001 From: Cedric-Froehner <78101394+Cedric-Froehner@users.noreply.github.com> Date: Sat, 9 May 2026 17:53:43 +0200 Subject: [PATCH 1/2] Switched hometeam selection to dropdown --- Goalcounter.html | 74 ++++++++++++++++++++++++------------------------ css/style.css | 1 + js/app.js | 3 +- 3 files changed, 40 insertions(+), 38 deletions(-) diff --git a/Goalcounter.html b/Goalcounter.html index adc350f..790e746 100644 --- a/Goalcounter.html +++ b/Goalcounter.html @@ -1,6 +1,6 @@ - - - + + + @@ -12,40 +12,40 @@ Torstand - - -
-
-
00:00
Paarung 1 von 3
-
-
-
-
- -
0
-
Tippen zum Zählen
-
-
- -
-
-
Team 2
-
0
-
Tippen zum Zählen
-
-
-
- - - -

⚽ Tor-Protokoll

-

-

-
-

⚙️ Teams einstellen

-
-
-
+ + +
+
+
00:00
Paarung 1 von 3
+
+
+
+
+ +
0
+
Tippen zum Zählen
+
+
+ +
+
+
Team 2
+
0
+
Tippen zum Zählen
+
+
+
+ + + +

⚽ Tor-Protokoll

+

+

+
+

⚙️ Teams einstellen

+ +
+
diff --git a/css/style.css b/css/style.css index e44f613..b0788c1 100644 --- a/css/style.css +++ b/css/style.css @@ -37,6 +37,7 @@ body{height:100vh;display:flex;flex-direction:column;font-family:Arial,sans-seri #so{background:rgba(0,0,0,.92)} .ov h1{font-size:2.5rem}.ov h2{font-size:1.8rem}.ov p{font-size:1rem;opacity:.8} .ov button{margin-top:6px;padding:10px 24px;border:none;border-radius:24px;background:white;color:#1a1a2e;font-size:1rem;font-weight:bold;cursor:pointer} +.ov select{margin-top:6px;padding:10px 24px;border:none;border-radius:24px;background:white;color:#1a1a2e;font-size:1rem;font-weight:bold;cursor:pointer} .obtn{background:rgba(255,255,255,.2)!important;color:white!important} .ov label{font-size:.85rem;opacity:.8;display:block;margin-top:10px;margin-bottom:3px} .ov input[type=text]{width:200px;padding:8px 12px;border-radius:12px;border:none;font-size:.9rem;text-align:center} diff --git a/js/app.js b/js/app.js index 3476cd3..a075b55 100644 --- a/js/app.js +++ b/js/app.js @@ -17,7 +17,8 @@ function applyTeamColors(){const tc1=textColor(t1bg),tc2=textColor(t2c);$('t1'). let swapped=false; function swapTeams(){swapped=!swapped;$('t1').style.order=swapped?2:0;$('t2').style.order=swapped?1:0;updateKickoffBall(false);} function mkPicker(id,cur,cb){const r=$(id);r.innerHTML='';CL.forEach(c=>{const b=document.createElement('div');b.className='cbtn'+(c===cur?' sel':'');b.style.background=c;b.style.border='3px solid '+(c===cur?'white':'transparent');b.onclick=()=>{cb(c);mkPicker(id,c,cb);};r.appendChild(b);});const cp=document.createElement('input');cp.type='color';cp.value=cur;cp.style.cssText='width:28px;height:28px;border-radius:50%;border:3px solid transparent;cursor:pointer;padding:0';cp.oninput=e=>{cb(e.target.value);r.querySelectorAll('.cbtn').forEach(b=>b.classList.remove('sel'));};r.appendChild(cp);} -function mkT1Pick(){const r=$('t1p');r.innerHTML='';TMS.forEach((t,i)=>{const b=document.createElement('button');b.className='tbtn'+(_i===i?' sel':'');b.textContent=t.n;b.onclick=()=>{_i=i;_c1=TMS[i].b;mkT1Pick();mkPicker('c1',_c1,c=>_c1=c);$('cw').style.display=i===5?'block':'none';};r.appendChild(b);});} +function mkT1Pick(){const r=$('t1s');r.innerHTML='';TMS.forEach((t,i)=>{const b=document.createElement('option');b.textContent=t.n;b.value=i;if(_i===i)b.selected=true;r.appendChild(b);});} +function T1PickChange(){const i=parseInt($('t1s').value);_i=i;_c1=TMS[i].b;mkPicker('c1',_c1,c=>_c1=c);$('cw').style.display=_i===5?'block':'none';} function openSettings(){_i=t1i;_c1=t1bg;_c2=t2c;$('ni').value=t2n;$('curl').value='';$('msw').checked=mode==='ko';mkT1Pick();mkPicker('c1',_c1,c=>_c1=c);mkPicker('c2',_c2,c=>_c2=c);$('cw').style.display=_i===5?'block':'none';$('so').classList.add('show');} function saveSettings(){const apply=lo=>{t1i=_i;t1bg=_c1;t1lo=lo;t1n=TMS[_i].n;t2n=$('ni').value.trim()||'Team 2';t2c=_c2;mode=$('msw').checked?'ko':'group';applyTeamColors();$('t2n').textContent=t2n;const l=$('l1');l.src=t1lo;l.alt=t1n;l.style.display=t1lo?'block':'none';updDots();updateKickoffBall(false);$('so').classList.remove('show');saveState();};if(_i===5){const f=$('cfile').files[0];if(f){const fr=new FileReader();fr.onload=e=>apply(e.target.result);fr.readAsDataURL(f);}else apply($('curl').value.trim()||t1lo);}else apply(TMS[_i].l);} function startTimer(){if(!running){iv=setInterval(()=>{secs++;$('timer').textContent=getTime();},1000);running=true;$('tt').textContent='⏸ Pause';acquireWakeLock();}} From b7bfc4b29da0827eddf82d06b3b881daa3f2aca0 Mon Sep 17 00:00:00 2001 From: Cedric-Froehner <78101394+Cedric-Froehner@users.noreply.github.com> Date: Sat, 9 May 2026 17:59:39 +0200 Subject: [PATCH 2/2] Added elipsis to indicate more configuration when selecting custom team --- js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index a075b55..507c084 100644 --- a/js/app.js +++ b/js/app.js @@ -1,4 +1,4 @@ -const TMS=[{n:'one.O',l:'https://www.og1o.com/_assets/625e2d6cb54141905b51c20d13baa45b/Images/oneo-logo.svg',b:'#434098'},{n:'Hermes',l:'https://www.myhermes.at/typo3conf/ext/generalfunctions/Resources/Public/img/logo.svg',b:'#ffffff'},{n:'Risk.Ident',l:'https://riskident.com/wp-content/uploads/2020/03/RiskIdent_Logo_2020-2.svg',b:'#fafafa'},{n:'OTTO',l:'https://upload.wikimedia.org/wikipedia/commons/a/ad/Otto_GmbH_logo.svg',b:'#ffffff'},{n:'mindline',l:'https://mindline.de/wp-content/uploads/2018/10/Logo-mindline-1.png',b:'#ffffff'},{n:'Eigenes',l:'',b:'#333333'}]; +const TMS=[{n:'one.O',l:'https://www.og1o.com/_assets/625e2d6cb54141905b51c20d13baa45b/Images/oneo-logo.svg',b:'#434098'},{n:'Hermes',l:'https://www.myhermes.at/typo3conf/ext/generalfunctions/Resources/Public/img/logo.svg',b:'#ffffff'},{n:'Risk.Ident',l:'https://riskident.com/wp-content/uploads/2020/03/RiskIdent_Logo_2020-2.svg',b:'#fafafa'},{n:'OTTO',l:'https://upload.wikimedia.org/wikipedia/commons/a/ad/Otto_GmbH_logo.svg',b:'#ffffff'},{n:'mindline',l:'https://mindline.de/wp-content/uploads/2018/10/Logo-mindline-1.png',b:'#ffffff'},{n:'Eigenes...',l:'',b:'#333333'}]; const CL=['#434098','#e74c3c','#e67e22','#f1c40f','#2ecc71','#1abc9c','#3498db','#9b59b6','#e91e63','#009900','#e2001a','#ffffff','#fafafa','#607d8b','#333333']; let sc=[0,0],round=1,nm=7,log=[],secs=0,running=false,iv=null,over=false,wakeLock=null,mode='group',kickoff=null; async function acquireWakeLock(){if('wakeLock'in navigator){try{wakeLock=await navigator.wakeLock.request('screen');wakeLock.addEventListener('release',()=>{wakeLock=null;});}catch(e){}}}