From af664aa315a21d3c6d667961ecc4dd19514ef51f Mon Sep 17 00:00:00 2001 From: Malaber Date: Fri, 14 Mar 2025 17:33:20 +0100 Subject: [PATCH 1/6] Hide cursor on fullscreen pages --- pages/tournament-fullscreen-groups.js | 1 + pages/tournament-fullscreen.js | 5 +++-- public/static/css/tournament.css | 12 ++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/pages/tournament-fullscreen-groups.js b/pages/tournament-fullscreen-groups.js index 4799756..682872a 100644 --- a/pages/tournament-fullscreen-groups.js +++ b/pages/tournament-fullscreen-groups.js @@ -70,6 +70,7 @@ class Main extends React.Component { } componentDidMount() { + document.body.classList.add('hide-cursor'); this.updateTournament(); const intervalIdPage = setInterval(this.increasePage, 15000); this.setState({intervalIdPage: intervalIdPage}); diff --git a/pages/tournament-fullscreen.js b/pages/tournament-fullscreen.js index 5819389..78b3a5c 100644 --- a/pages/tournament-fullscreen.js +++ b/pages/tournament-fullscreen.js @@ -33,7 +33,7 @@ function Matches(props) { )} ); } - return (
+ return (
{matches}
); } @@ -55,7 +55,7 @@ function FilterDropdown(props) { function FullscreenPageHeader(props) { - return ( + return ( {props.title} ); @@ -96,6 +96,7 @@ class Main extends React.Component { } componentDidMount() { + document.body.classList.add('hide-cursor'); const tournamentId = this.props.query.code; getTournamentMeta(tournamentId, this.onTournamentRequestSuccess, this.onTournamentRequestError); this.updateMatches(); diff --git a/public/static/css/tournament.css b/public/static/css/tournament.css index 5855f3f..37d105e 100644 --- a/public/static/css/tournament.css +++ b/public/static/css/tournament.css @@ -26,3 +26,15 @@ .scoreInput { width: 11rem; } + +.hide-cursor { + cursor: none; +} + +.show-cursor { + cursor: pointer; +} + +.disable-hover { + pointer-events: none; +} From 030cc12544566024819b45d19a20f212d8b11d52 Mon Sep 17 00:00:00 2001 From: Malaber Date: Sun, 16 Mar 2025 16:22:12 +0100 Subject: [PATCH 2/6] Overengineering for big image text --- js/components/BigImage.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/js/components/BigImage.js b/js/components/BigImage.js index b89f6ff..aba9d5a 100644 --- a/js/components/BigImage.js +++ b/js/components/BigImage.js @@ -1,9 +1,27 @@ -import React from 'react'; +import React, {useEffect} from 'react'; export function BigImage(props) { + useEffect(() => { + const handleResize = () => { + const element = document.querySelector('.dynamically-resizing-h1'); + if (element) { + const parentWidth = element.parentElement.offsetWidth; + const fontSize = parentWidth / 16; // Adjust the divisor as needed + element.style.fontSize = `${fontSize}px`; + } + }; + + window.addEventListener('resize', handleResize); + handleResize(); // Initial call to set the font size + + return () => { + window.removeEventListener('resize', handleResize); + }; + }, []); + return (
-

{props.text}

+

{props.text}

); } From 7cff7bdb0bbda7baffaee6abb38c8c9e378c7567 Mon Sep 17 00:00:00 2001 From: Malaber Date: Sun, 16 Mar 2025 16:24:28 +0100 Subject: [PATCH 3/6] Clean up footer --- js/components/Footer.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/js/components/Footer.js b/js/components/Footer.js index d29ea06..70687cf 100644 --- a/js/components/Footer.js +++ b/js/components/Footer.js @@ -1,20 +1,13 @@ export function Footer() { return ( -