Merge branch 'master' into favorites
# Conflicts: # js/components/GroupStage.js # public/static/css/tournament.css
This commit is contained in:
commit
a8fb26a5b1
|
|
@ -39,3 +39,7 @@ $ docker build -t turniere-frontend .
|
||||||
```
|
```
|
||||||
|
|
||||||
The built container exposes port 80.
|
The built container exposes port 80.
|
||||||
|
|
||||||
|
# Todo
|
||||||
|
|
||||||
|
Timer in topnav
|
||||||
|
|
@ -1,9 +1,27 @@
|
||||||
import React from 'react';
|
import React, {useEffect} from 'react';
|
||||||
|
|
||||||
export function BigImage(props) {
|
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 (
|
return (
|
||||||
<div className="big-image">
|
<div className="big-image">
|
||||||
<h1 className="display-1">{props.text}</h1>
|
<h1 className="text-truncate overflow-hidden dynamically-resizing-h1">{props.text}</h1>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,13 @@
|
||||||
export function Footer() {
|
export function Footer() {
|
||||||
return (
|
return (
|
||||||
<footer className="footer mt-5 bg-dark text-light">
|
<footer className="footer mt-5 p-3 bg-dark text-light text-center">
|
||||||
<div className="container py-3">
|
<Copyright/> · <Privacy/> · <Imprint/>
|
||||||
<div className="row">
|
|
||||||
<div className="col-md-6 text-center">
|
|
||||||
<Copyright/> · <Privacy/> · <Imprint/>
|
|
||||||
</div>
|
|
||||||
<div className="col-md-6 text-center"><MoveToTop/></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</footer>
|
</footer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function Copyright() {
|
function Copyright() {
|
||||||
return <span>© 2024 turnie.re</span>;
|
return <span>© 2025 turnie.re</span>;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Privacy() {
|
function Privacy() {
|
||||||
|
|
@ -24,7 +17,3 @@ function Privacy() {
|
||||||
function Imprint() {
|
function Imprint() {
|
||||||
return <a className="text-white" href="/imprint">Impressum</a>;
|
return <a className="text-white" href="/imprint">Impressum</a>;
|
||||||
}
|
}
|
||||||
|
|
||||||
function MoveToTop() {
|
|
||||||
return <a href="#" className="text-white">zurück nach oben</a>;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,11 @@ export default class GroupStage extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="py-2 px-1">
|
<div className='py-2 px-1'>
|
||||||
<h1 className="custom-font m-2">
|
<h1 className='custom-font'>
|
||||||
<span className="px-2">Gruppenphase</span>
|
<span className='px-2'>Gruppenphase</span>
|
||||||
</h1>
|
</h1>
|
||||||
<Row className="">
|
<Row className='mt-3 gx-0'>
|
||||||
{this.props.groups.map(group => (
|
{this.props.groups.map(group => (
|
||||||
<Group
|
<Group
|
||||||
group={group}
|
group={group}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ export function LoadingPage(props) {
|
||||||
<TurniereNavigation/>
|
<TurniereNavigation/>
|
||||||
<Container>
|
<Container>
|
||||||
<div className='text-center'>
|
<div className='text-center'>
|
||||||
<img src='/static/images/logo-questionmark.png' alt='' className='loading-logo'/>
|
<img src='/static/images/logo-questionmark.png' alt='' className='img-fluid loading-logo'/>
|
||||||
</div>
|
</div>
|
||||||
<div className='py-5 text-center w-100 h1 custom-font'>
|
<div className='py-5 text-center w-100 h1 custom-font'>
|
||||||
{props.text}
|
{props.text}
|
||||||
|
|
|
||||||
|
|
@ -10,22 +10,16 @@ import {notify} from 'react-notify-toast';
|
||||||
export class TurniereNavigation extends React.Component {
|
export class TurniereNavigation extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this.toggle = this.toggle.bind(this);
|
this.toggle = this.toggle.bind(this);
|
||||||
|
this.state = {collapsed: true};
|
||||||
this.state = {
|
|
||||||
collapsed: true
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
toggle() {
|
toggle() {
|
||||||
this.setState({
|
this.setState({collapsed: !this.state.collapsed});
|
||||||
collapsed: !this.state.collapsed
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (<Navbar color="light" light expand="lg">
|
return (<Navbar color="light" light expand="lg" sticky="top">
|
||||||
<NavbarBrand href="/">turnie.re</NavbarBrand>
|
<NavbarBrand href="/">turnie.re</NavbarBrand>
|
||||||
<NavbarToggler onClick={this.toggle}/>
|
<NavbarToggler onClick={this.toggle}/>
|
||||||
<Collapse isOpen={!this.state.collapsed} navbar>
|
<Collapse isOpen={!this.state.collapsed} navbar>
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ class Main extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
document.body.classList.add('hide-cursor');
|
||||||
this.updateTournament();
|
this.updateTournament();
|
||||||
const intervalIdPage = setInterval(this.increasePage, 15000);
|
const intervalIdPage = setInterval(this.increasePage, 15000);
|
||||||
this.setState({intervalIdPage: intervalIdPage});
|
this.setState({intervalIdPage: intervalIdPage});
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ function Matches(props) {
|
||||||
)}
|
)}
|
||||||
</Row>);
|
</Row>);
|
||||||
}
|
}
|
||||||
return (<div className='mx-4 h5'>
|
return (<div className='mx-4 h5 disable-hover'>
|
||||||
{matches}
|
{matches}
|
||||||
</div>);
|
</div>);
|
||||||
}
|
}
|
||||||
|
|
@ -55,7 +55,7 @@ function FilterDropdown(props) {
|
||||||
|
|
||||||
|
|
||||||
function FullscreenPageHeader(props) {
|
function FullscreenPageHeader(props) {
|
||||||
return (<Navbar color='light' className='mb-4 border-bottom py-0'>
|
return (<Navbar color='light' className='mb-4 border-bottom py-0 show-cursor'>
|
||||||
<FilterDropdown {...props.filter}/>
|
<FilterDropdown {...props.filter}/>
|
||||||
<NavbarBrand>{props.title}</NavbarBrand>
|
<NavbarBrand>{props.title}</NavbarBrand>
|
||||||
</Navbar>);
|
</Navbar>);
|
||||||
|
|
@ -96,6 +96,7 @@ class Main extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
document.body.classList.add('hide-cursor');
|
||||||
const tournamentId = this.props.query.code;
|
const tournamentId = this.props.query.code;
|
||||||
getTournamentMeta(tournamentId, this.onTournamentRequestSuccess, this.onTournamentRequestError);
|
getTournamentMeta(tournamentId, this.onTournamentRequestSuccess, this.onTournamentRequestError);
|
||||||
this.updateMatches();
|
this.updateMatches();
|
||||||
|
|
|
||||||
|
|
@ -73,3 +73,15 @@
|
||||||
outline: none !important;
|
outline: none !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hide-cursor {
|
||||||
|
cursor: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.show-cursor {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.disable-hover {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue