mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-05 03:02:56 +00:00
dev day #77
This commit is contained in:
@@ -1049,7 +1049,7 @@ const HomePage: React.FC = () => {
|
||||
<div className="name">{p.name}</div>
|
||||
<div className="role">{p.position || 'Hráč'}</div>
|
||||
{typeof p.number !== 'undefined' && <div className="number">#{p.number}</div>}
|
||||
{typeof p.age === 'number' && <div className="age">{p.age} let</div>}
|
||||
{typeof p.age === 'number' && <div className="age">{p.age} {czYears(p.age)}</div>}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
@@ -1338,7 +1338,7 @@ const HomePage: React.FC = () => {
|
||||
// }
|
||||
|
||||
return (
|
||||
<MainLayout headerInsideContainer showSponsorsSection={false}>
|
||||
<MainLayout showSponsorsSection={false}>
|
||||
<div className="container" data-element="container" style={{ ...getStyles('container') }}>
|
||||
<div data-element="style-pack" data-variant={stylePack} style={{ display: 'none' }} />
|
||||
{/* Above-hero club bar (MyUIbrix managed) */}
|
||||
@@ -1520,6 +1520,7 @@ const HomePage: React.FC = () => {
|
||||
setSelectedMatch({ ...m, competition: compName, competitionName: compName });
|
||||
setIsMatchModalOpen(true);
|
||||
}}
|
||||
variant={getVariant('matches-slider', 'carousel') as any}
|
||||
elementProps={{ 'data-element': 'matches-slider', 'data-variant': getVariant('matches-slider', 'carousel'), style: { position: 'relative', ...getStyles('matches-slider') } }}
|
||||
/>
|
||||
)}
|
||||
@@ -1554,7 +1555,11 @@ const HomePage: React.FC = () => {
|
||||
<h3>Další aktuality</h3>
|
||||
<a href="/news" className="see-all" style={{ fontSize: '0.85rem' }}>Zobrazit vše <FiArrowRight size={14} /></a>
|
||||
</div>
|
||||
<NewsList items={news as any} />
|
||||
{newsVariant === 'scroller' ? (
|
||||
<BlogCardsScroller />
|
||||
) : (
|
||||
<NewsList items={news as any} />
|
||||
)}
|
||||
</section>
|
||||
)}
|
||||
|
||||
@@ -1642,7 +1647,7 @@ const HomePage: React.FC = () => {
|
||||
{isVisible('videos', false) && (
|
||||
<section data-element="videos" data-variant={getVariant('videos', 'grid')} style={{ marginTop: 32, marginBottom: 32, position: 'relative', ...getStyles('videos') }}>
|
||||
<div style={{ maxWidth: 1200, margin: '0 auto', padding: '0 12px' }}>
|
||||
<VideosSection />
|
||||
<VideosSection variant={(getVariant('videos', 'grid') as any) as 'grid' | 'carousel'} />
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
@@ -1831,4 +1836,13 @@ const HomePage: React.FC = () => {
|
||||
);
|
||||
};
|
||||
|
||||
function czYears(n: number): string {
|
||||
const mod100 = n % 100;
|
||||
if (mod100 >= 11 && mod100 <= 14) return 'let';
|
||||
const mod10 = n % 10;
|
||||
if (mod10 === 1) return 'rok';
|
||||
if (mod10 >= 2 && mod10 <= 4) return 'roky';
|
||||
return 'let';
|
||||
}
|
||||
|
||||
export default HomePage;
|
||||
|
||||
Reference in New Issue
Block a user