diff --git a/src/assets/Kautilya.png b/src/assets/Kautilya.png new file mode 100644 index 0000000..825bed7 Binary files /dev/null and b/src/assets/Kautilya.png differ diff --git a/src/components/Articles.tsx b/src/components/Articles.tsx index 83009e3..4faf471 100644 --- a/src/components/Articles.tsx +++ b/src/components/Articles.tsx @@ -134,7 +134,25 @@ const articles = [ featured: false, views: '1.5k', likes: 28 - } + }, + { + id: '7', + slug: 'strategic-thinking-frameworks', + title: 'Strategic Thinking Frameworks for Modern Leaders', + excerpt: 'Master strategic thinking with proven frameworks that help leaders anticipate challenges and seize opportunities.', + content: 'Strategic thinking is a critical skill for leaders navigating complex business environments...', + author: 'Dr. Amanda Foster', + authorTitle: 'Strategic Leadership Coach', + authorAvatar: 'https://images.unsplash.com/photo-1544725176-7c40e5a71c5e?w=150&h=150&fit=crop&crop=face', + date: '2024-02-05', + readTime: '11 min read', + category: 'Strategy', + tags: ['Strategic Thinking', 'Frameworks', 'Decision Making', 'Planning'], + thumbnail: 'https://images.unsplash.com/photo-1552664730-d307ca884978?w=600&h=400&fit=crop', + featured: false, + views: '2.1k', + likes: 39 + }, ]; export function Articles() { @@ -147,7 +165,9 @@ export function Articles() { const [sortBy, setSortBy] = useState('Most Recent'); const [viewMode, setViewMode] = useState<'grid' | 'list'>('grid'); const [currentPage, setCurrentPage] = useState(1); - const articlesPerPage = 6; + const articlesPerPage = 4; + const containerRef = useRef(null); + // Get unique values for filters const categories = ['All Categories', ...Array.from(new Set(articles.map(article => article.category)))]; @@ -166,31 +186,31 @@ export function Articles() { // Filter and sort articles const filteredArticles = articles.filter(article => { const matchesSearch = article.title.toLowerCase().includes(searchTerm.toLowerCase()) || - article.excerpt.toLowerCase().includes(searchTerm.toLowerCase()) || - article.author.toLowerCase().includes(searchTerm.toLowerCase()) || - article.tags.some(tag => tag.toLowerCase().includes(searchTerm.toLowerCase())); + article.excerpt.toLowerCase().includes(searchTerm.toLowerCase()) || + article.author.toLowerCase().includes(searchTerm.toLowerCase()) || + article.tags.some(tag => tag.toLowerCase().includes(searchTerm.toLowerCase())); const matchesCategory = selectedCategory === 'All Categories' || article.category === selectedCategory; const matchesAuthor = selectedAuthor === 'All Authors' || article.author === selectedAuthor; - - // Read time filter - const readTimeMinutes = parseInt(article.readTime); + + // FIXED: Read time filter - properly parse the read time + const readTimeMinutes = parseInt(article.readTime.replace(' min read', '')) || 0; const matchesReadTime = selectedReadTime === 'All Read Times' || - (selectedReadTime === 'Under 5 min' && readTimeMinutes < 5) || - (selectedReadTime === '5-10 min' && readTimeMinutes >= 5 && readTimeMinutes <= 10) || - (selectedReadTime === 'Over 10 min' && readTimeMinutes > 10); - + (selectedReadTime === 'Under 5 min' && readTimeMinutes < 5) || + (selectedReadTime === '5-10 min' && readTimeMinutes >= 5 && readTimeMinutes <= 10) || + (selectedReadTime === 'Over 10 min' && readTimeMinutes > 10); + // Date range filter const articleDate = new Date(article.date); const now = new Date(); const matchesDateRange = selectedDateRange === 'All Time' || - (selectedDateRange === 'Last 7 days' && (now.getTime() - articleDate.getTime()) <= 7 * 24 * 60 * 60 * 1000) || - (selectedDateRange === 'Last 30 days' && (now.getTime() - articleDate.getTime()) <= 30 * 24 * 60 * 60 * 1000) || - (selectedDateRange === 'Last 3 months' && (now.getTime() - articleDate.getTime()) <= 90 * 24 * 60 * 60 * 1000); - + (selectedDateRange === 'Last 7 days' && (now.getTime() - articleDate.getTime()) <= 7 * 24 * 60 * 60 * 1000) || + (selectedDateRange === 'Last 30 days' && (now.getTime() - articleDate.getTime()) <= 30 * 24 * 60 * 60 * 1000) || + (selectedDateRange === 'Last 3 months' && (now.getTime() - articleDate.getTime()) <= 90 * 24 * 60 * 60 * 1000); + // Topic filter - const matchesTopic = selectedTopic === 'All Topics' || - article.tags.includes(selectedTopic); - + const matchesTopic = selectedTopic === 'All Topics' || + article.tags.includes(selectedTopic); + return matchesSearch && matchesCategory && matchesAuthor && matchesReadTime && matchesDateRange && matchesTopic; }).sort((a, b) => { switch (sortBy) { @@ -201,7 +221,8 @@ export function Articles() { case 'title': return a.title.localeCompare(b.title); case 'readTime': - return parseInt(a.readTime) - parseInt(b.readTime); + // FIXED: Sort by read time - properly parse the values + return (parseInt(a.readTime.replace(' min read', '')) || 0) - (parseInt(b.readTime.replace(' min read', '')) || 0); case 'popular': return parseInt(b.views) - parseInt(a.views); default: @@ -234,12 +255,12 @@ export function Articles() { - const hasActiveFilters = searchTerm || - selectedCategory !== 'All Categories' || - selectedAuthor !== 'All Authors' || - selectedReadTime !== 'All Read Times' || - selectedDateRange !== 'All Time' || - selectedTopic !== 'All Topics'; + const hasActiveFilters = searchTerm || + selectedCategory !== 'All Categories' || + selectedAuthor !== 'All Authors' || + selectedReadTime !== 'All Read Times' || + selectedDateRange !== 'All Time' || + selectedTopic !== 'All Topics'; return (
@@ -260,11 +281,11 @@ export function Articles() {
INSIGHTS & KNOWLEDGE
- +

Articles & Research

- +

Discover cutting-edge insights, research findings, and expert perspectives on leadership development, management strategies, and organizational excellence.

@@ -320,11 +341,10 @@ export function Articles() {
- - - Page {currentPage} of {totalPages} - - + +
+ {Array.from({ length: totalPages }, (_, i) => { + const page = i + 1; + // Show limited pages for better UX + if (totalPages > 7) { + const showPage = + page === 1 || + page === totalPages || + (page >= currentPage - 1 && page <= currentPage + 1); + + if (!showPage) { + if (page === currentPage - 2 || page === currentPage + 2) { + return ...; + } + return null; + } + } + + return ( + + ); + })} +
+
)} @@ -703,9 +764,9 @@ export function Articles() {
-
@@ -715,8 +776,8 @@ export function Articles() {

- Ready to explore more insights? - @@ -725,7 +786,7 @@ export function Articles() { our complete library of leadership resources.

- navigateTo('/learning/articles')} ariaLabel="Browse all leadership articles and resources" diff --git a/src/components/LearningFacilityNew.tsx b/src/components/LearningFacilityNew.tsx index 08176d6..9e9cfb7 100644 --- a/src/components/LearningFacilityNew.tsx +++ b/src/components/LearningFacilityNew.tsx @@ -735,142 +735,6 @@ export function LearningFacilityNew() {
- {/* Cultural Theme Images Section */} -
-
-
- {/* Header */} -
-
-
- Cultural Experience -
-

- Journey Through Cultural Heritage -

-

- Experience the rich cultural tapestry woven throughout our leadership center. Each space tells a story of ancient wisdom, spiritual foundations, and timeless traditions that inspire modern leaders. -

-
- - {/* Cultural Images Carousel */} -
- {/* Navigation Controls */} -
- - -
- - {/* Horizontal Scrolling Images */} - -
-
-
-
- {/* Deluxe Living & Recreation Section */}
diff --git a/src/components/VirtualSpaceSection.tsx b/src/components/VirtualSpaceSection.tsx index bd465f3..683e03b 100644 --- a/src/components/VirtualSpaceSection.tsx +++ b/src/components/VirtualSpaceSection.tsx @@ -1,9 +1,9 @@ import React, { useState } from "react"; import { motion } from "motion/react"; -import { - Building, - Users, - Presentation, +import { + Building, + Users, + Presentation, Coffee, Play, Calendar, @@ -22,7 +22,7 @@ import { Label } from "./ui/label"; import { Textarea } from "./ui/textarea"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./ui/select"; import { navigateTo } from "./Router"; - +import kautilya from "../assets/Kautilya.png"; // Calendar helper functions const getDaysInMonth = (date: Date) => { return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate(); @@ -41,7 +41,7 @@ const isDateAvailable = (date: Date) => { today.setHours(0, 0, 0, 0); const selectedDate = new Date(date); selectedDate.setHours(0, 0, 0, 0); - + // Available if it's today or in the future, and not a Sunday return selectedDate >= today && selectedDate.getDay() !== 0; }; @@ -117,7 +117,7 @@ function FacilityCard({ facility, index }: FacilityCardProps) { transition={{ duration: 0.7, delay: index * 0.15 }} viewport={{ once: true, margin: "-50px" }} > - + {/* Background Image - Full Height */}
{/* Icon */}
-
-
@@ -164,14 +164,14 @@ function FacilityCard({ facility, index }: FacilityCardProps) { } // Modal Component for Virtual Tour and Booking -function BookingModal({ - facility, - isOpen, - onClose -}: { - facility: typeof facilities[0] | null; - isOpen: boolean; - onClose: () => void; +function BookingModal({ + facility, + isOpen, + onClose +}: { + facility: typeof facilities[0] | null; + isOpen: boolean; + onClose: () => void; }) { const [bookingForm, setBookingForm] = useState({ companyName: '', @@ -257,7 +257,7 @@ function BookingModal({ for (let day = 1; day <= daysInMonth; day++) { const date = new Date(currentMonth.getFullYear(), currentMonth.getMonth(), day); const isAvailable = isDateAvailable(date); - const isSelected = selectedDate && + const isSelected = selectedDate && date.getFullYear() === selectedDate.getFullYear() && date.getMonth() === selectedDate.getMonth() && date.getDate() === selectedDate.getDate(); @@ -325,7 +325,7 @@ function BookingModal({
{/* Calendar Footer - Compact */} -
+ {/*
@@ -336,7 +336,7 @@ function BookingModal({ Available
-
+
*/}
); }; @@ -344,21 +344,21 @@ function BookingModal({ if (!isOpen || !facility) return null; return ( -
-
e.stopPropagation()} > {/* Modal Header - Compact */} -
-
@@ -394,7 +394,7 @@ function BookingModal({

Virtual Tour

- + {/* Virtual Tour Container - Developer-Ready for 360 Viewer or Video */}
{/* @@ -409,7 +409,7 @@ function BookingModal({ Current implementation: Fallback video iframe Replace the entire div below with your 360 viewer component */} -
{/* Fallback: Video iframe - Replace this entire section with 360 viewer */} -