diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3d19a63..5af8d13 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,3 +9,9 @@ variables: include: - project: 'turniere/turniere-infra' file: '/ci/pipeline.yaml' + +eslint: + stage: test + script: + - yarn install + - yarn eslint . diff --git a/README.md b/README.md index f4d7260..e730bc3 100644 --- a/README.md +++ b/README.md @@ -41,3 +41,8 @@ $ docker build -t turniere-frontend . ``` The built container exposes port 80. + +# Todo + +Timer in topnav +showMatches={playoffStages !== null} showmatches in GroupStage mittlerweile vmtl useless weil immer eingeklappt \ No newline at end of file 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 (
{favorite ? favorite.name : ''}
+