diff --git a/public/images/film-bg.avif b/public/images/film-bg.avif new file mode 100644 index 0000000..ce078e5 Binary files /dev/null and b/public/images/film-bg.avif differ diff --git a/public/images/main-bg-1.webp b/public/images/main-bg-1.webp new file mode 100644 index 0000000..f831553 Binary files /dev/null and b/public/images/main-bg-1.webp differ diff --git a/public/images/main-bg.webp b/public/images/main-bg.webp new file mode 100644 index 0000000..d09eec5 Binary files /dev/null and b/public/images/main-bg.webp differ diff --git a/src/assets/images/film-bg.avif b/src/assets/images/film-bg.avif new file mode 100644 index 0000000..ce078e5 Binary files /dev/null and b/src/assets/images/film-bg.avif differ diff --git a/src/components/ArticleCard.tsx b/src/components/ArticleCard.tsx index 628e843..bc2e168 100644 --- a/src/components/ArticleCard.tsx +++ b/src/components/ArticleCard.tsx @@ -1,6 +1,7 @@ import { Clock, ThumbsUp, MapPin } from 'lucide-react'; import { Link } from 'react-router-dom'; import { Article } from '../types'; +import MinutesWord from './MinutesWord.tsx'; interface ArticleCardProps { article: Article; @@ -40,7 +41,7 @@ export function ArticleCard({ article, featured = false }: ArticleCardProps) {

{article.author.name}

- {article.readTime} min read + {article.readTime} на чтение
@@ -55,7 +56,7 @@ export function ArticleCard({ article, featured = false }: ArticleCardProps) { to={`/article/${article.id}`} className="text-blue-600 font-medium hover:text-blue-800" > - Read More → + Читать →
diff --git a/src/components/FeaturedSection.tsx b/src/components/FeaturedSection.tsx index 9d933f0..b728b4f 100644 --- a/src/components/FeaturedSection.tsx +++ b/src/components/FeaturedSection.tsx @@ -46,10 +46,10 @@ export function FeaturedSection() {

- No articles found + Еще нет заметок

- Please try a different category or city + Выберите другой раздел или город

@@ -61,10 +61,10 @@ export function FeaturedSection() {

{city ? `${city} ` : ''} - {category ? `${category} Stories` : 'Featured Stories'} + {category ? `${category} Статьи` : 'Тематические статьи'}

- Showing {Math.min(currentPage * ARTICLES_PER_PAGE, filteredArticles.length)} of {filteredArticles.length} articles + Показано {Math.min(currentPage * ARTICLES_PER_PAGE, filteredArticles.length)} из {filteredArticles.length} статей

diff --git a/src/components/Footer/DesignStudioLogo.tsx b/src/components/Footer/DesignStudioLogo.tsx index ac855af..afc50c3 100644 --- a/src/components/Footer/DesignStudioLogo.tsx +++ b/src/components/Footer/DesignStudioLogo.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Palette } from 'lucide-react'; export function DesignStudioLogo() { diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx index 53408d0..31bf776 100644 --- a/src/components/Footer/index.tsx +++ b/src/components/Footer/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Link } from 'react-router-dom'; import { Mail, Phone, Instagram, Twitter, Facebook, ExternalLink } from 'lucide-react'; import { DesignStudioLogo } from './DesignStudioLogo'; diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 1ca6d36..577416e 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -53,7 +53,7 @@ export function Header() { {isMobileMenuOpen ? : } -

CultureScope

+

Культура

diff --git a/src/components/MinutesWord.tsx b/src/components/MinutesWord.tsx new file mode 100644 index 0000000..2a42136 --- /dev/null +++ b/src/components/MinutesWord.tsx @@ -0,0 +1,22 @@ +import React from 'react'; + +// Описание типа для пропсов компонента +interface MinutesWordProps { + minutes: number; // Количество минут +} + +const MinutesWord: React.FC = ({ minutes }) => { + const getMinuteWord = (minutes: number): string => { + if (minutes === 1) { + return "минута"; + } + if (minutes >= 2 && minutes <= 4) { + return "минуты"; + } + return "минут"; + }; + + return <>{getMinuteWord(minutes)}; +}; + +export default MinutesWord; diff --git a/src/hooks/useBackgroundImage.ts b/src/hooks/useBackgroundImage.ts index 0ec9448..682e13b 100644 --- a/src/hooks/useBackgroundImage.ts +++ b/src/hooks/useBackgroundImage.ts @@ -1,8 +1,8 @@ import { Category } from '../types'; const backgroundImages = { - Film: 'https://images.unsplash.com/photo-1478720568477-152d9b164e26?auto=format&fit=crop&q=80&w=2070', - Theater: 'https://images.unsplash.com/photo-1507676184212-d03ab07a01bf?auto=format&fit=crop&q=80&w=2070', + Film: '/images/film-bg.avif?auto=format&fit=crop&q=80&w=2070', + Theater: '/images/main-bg-1.webp?auto=format&fit=crop&q=80&w=2070', Music: 'https://images.unsplash.com/photo-1520523839897-bd0b52f945a0?auto=format&fit=crop&q=80&w=2070', Sports: 'https://images.unsplash.com/photo-1461896836934-ffe607ba8211?auto=format&fit=crop&q=80&w=2070', Art: 'https://images.unsplash.com/photo-1547826039-bfc35e0f1ea8?auto=format&fit=crop&q=80&w=2070', diff --git a/src/pages/ArticlePage.tsx b/src/pages/ArticlePage.tsx index befc18d..3349a43 100644 --- a/src/pages/ArticlePage.tsx +++ b/src/pages/ArticlePage.tsx @@ -6,6 +6,7 @@ import { ReactionButtons } from '../components/ReactionButtons'; import { PhotoGallery } from '../components/PhotoGallery'; import { articles } from '../data/mock'; import { Article } from '../types'; +import MinutesWord from '../components/MinutesWord'; export function ArticlePage() { const { id } = useParams(); @@ -60,7 +61,7 @@ export function ArticlePage() { className="inline-flex items-center text-gray-600 hover:text-gray-900 mb-8" > - Back to articles + К списку статей
@@ -76,8 +77,8 @@ export function ArticlePage() {

{articleData.author.name}

- {articleData.readTime} min read ·{' '} - {new Date(articleData.publishedAt).toLocaleDateString('en-US', { + {articleData.readTime} на чтение ·{' '} + {new Date(articleData.publishedAt).toLocaleDateString('ru-RU', { month: 'long', day: 'numeric', year: 'numeric', diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx index 9b6576d..2f78c1e 100644 --- a/src/pages/HomePage.tsx +++ b/src/pages/HomePage.tsx @@ -12,31 +12,61 @@ export function HomePage() { const getHeroTitle = () => { if (category) { return { - main: `Discover ${category}`, - sub: getCategoryDescription(category) + main: getCategoryTitle(category), + sub: getCategoryDescription(category), + description: getCategoryText(category) }; } return { main: 'Discover the World of', - sub: 'Arts & Culture' + sub: 'Все о культуре Москвы и Петербурга', + description: 'Следите за событиями культурной жизни столиц: концерты, выставки, спектакли и многое другое в одном удобном формате.' }; }; + const getCategoryTitle = (category: Category): string => { + const title = { + Film: 'Кино', + Theater: 'Театр', + Music: 'Музыка', + Sports: 'Спорт', + Art: 'Искусство', + Legends: 'Легенды', + Anniversaries: 'Юбилеи', + Memory: 'Память' + }; + return title[category]; + }; + const getCategoryDescription = (category: Category): string => { const descriptions = { - Film: 'Cinema & Motion Pictures', - Theater: 'Stage & Performance', - Music: 'Rhythm & Harmony', - Sports: 'Athletics & Competition', - Art: 'Visual & Creative Expression', - Legends: 'Stories & Heritage', - Anniversaries: 'Celebrations & Milestones', - Memory: 'History & Remembrance' + Film: 'Свет, камера, действие! Магия кино', + Theater: 'Гармония актёра и зрителя', + Music: 'Мелодии двух столиц', + Sports: 'Сила, движение, победа', + Art: 'Шедевры говорят с нами', + Legends: 'Истории, которые вдохновляют', + Anniversaries: 'Вехи истории и великие даты', + Memory: 'Память о великом и наследие' }; return descriptions[category]; }; - const { main, sub } = getHeroTitle(); + const getCategoryText = (category: Category): string => { + const subtexts = { + Film: 'Узнайте о кино-премьерах, фестивалях и знаковых фильмах Москвы и Петербурга. Мир кино открывается для вас.', + Theater: 'Откройте для себя театральные премьеры и закулисье лучших сцен Москвы и Петербурга.', + Music: 'Исследуйте богатый музыкальный мир двух столиц. Узнайте о лучших исполнителях и событиях.', + Sports: 'Спорт — это не только движение, но и культура. Откройте для себя спортивные события двух столиц.', + Art: 'Откройте богатство искусства Москвы и Петербурга: от классики до современного авангарда.', + Legends: 'Узнайте о великих личностях Москвы и Петербурга. Легенды, которые формируют культуру.', + Anniversaries: 'Погрузитесь в исторические события и юбилеи, которые оставляют след в культуре двух столиц.', + Memory: 'Сохраняем культурные традиции и память о великих событиях и людях.' + }; + return subtexts[category]; + }; + + const { main, sub, description } = getHeroTitle(); return ( <> @@ -62,24 +92,9 @@ export function HomePage() { {sub}

- {category ? - `Explore the latest ${category.toLowerCase()} stories, events, and cultural highlights from around the globe.` : - 'Explore the latest in art, music, theater, and cultural events from around the globe. Join us on a journey through the world\'s most inspiring creative expressions.' - } + {description}