diff --git a/TECHNICAL_DOCUMENTATION.md b/TECHNICAL_DOCUMENTATION.md index 65fa6c8..9c5d42b 100644 --- a/TECHNICAL_DOCUMENTATION.md +++ b/TECHNICAL_DOCUMENTATION.md @@ -1,5 +1,26 @@ # Technical Documentation - ENGL 2502: Jane Austen +## Recent Changes + +### Character Blogs Removal (Latest Update) + +- Removed character blogs feature completely +- Deleted related files: + - `src/data/blog-posts.ts` + - `src/data/blogPosts.ts` + - `src/pages/Blogs.tsx` + - `src/components/BlogPost.tsx` + - `src/pages/BlogPost/BlogPost.tsx` + - `src/types/blog.ts` +- Updated navigation: + - Removed blog routes from routing configuration + - Removed "Character Blogs" from navigation menu + - Removed Character Insights section from homepage +- Cleaned up dependencies: + - Removed unused imports + - Fixed linter errors + - Removed blog-related types from `src/types/index.ts` + ## Project Overview A React-based academic web application focused on analyzing Jane Austen's works, themes, and their modern relevance. The project combines literary analysis with interactive features to provide deep insights into Austen's novels and their contemporary interpretations. @@ -37,45 +58,28 @@ src/ │ ├── Navbar.tsx │ ├── Pagination.tsx │ └── theme-provider.tsx -│ -├── data/ -│ ├── novels/ # Novel-specific content -│ │ ├── northanger-abbey.ts -│ │ ├── sense-and-sensibility.ts -│ │ ├── pride-and-prejudice.ts -│ │ └── mansfield-park.ts -│ ├── analysis/ # Analysis data -│ │ ├── themes.ts -│ │ ├── characters.ts -│ │ └── social-class.ts -│ ├── contemporary/ # Modern retellings data -│ │ ├── pride.ts # Pride by Ibi Zoboi -│ │ └── longbourn.ts # Longbourn by Jo Baker -│ └── timeline.ts # Chronological data -│ -├── pages/ -│ ├── novels/ # Individual novel pages -│ │ ├── NorthangerAbbey.tsx -│ │ ├── SenseAndSensibility.tsx -│ │ ├── PrideAndPrejudice.tsx -│ │ └── MansfieldPark.tsx -│ ├── Analysis.tsx # Literary analysis page -│ ├── Characters.tsx # Character studies -│ ├── Contemporary.tsx # Modern retellings -│ ├── Network.tsx # Character network -│ ├── Timeline.tsx # Interactive timeline -│ └── SocialClass.tsx # Social class analysis ``` ## Navigation Structure -The application uses a new academically-focused navigation structure: +The application uses a focused academic navigation structure: ### Primary Navigation - Literary Analysis - Novel Studies - Character Studies +- Quiz +- Vendors +- Success Stories +- Market Calculator + +### Analysis Navigation + +- Literary Analysis +- Character Network +- Timeline +- Social Class ### Course Novels (Norton Critical Editions) diff --git a/src/App.tsx b/src/App.tsx index fab17e1..c943dbd 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,8 +2,6 @@ import React, { Suspense } from 'react'; import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; import MainLayout from './components/layout/MainLayout'; import Home from './pages/Home'; -import Blogs from './pages/Blogs'; -import BlogPost from './pages/BlogPost/BlogPost'; import { ErrorBoundary } from './components/ErrorBoundary'; import SuccessStories from './pages/SuccessStories'; import Analysis from './pages/Analysis'; @@ -25,8 +23,6 @@ function App() { Loading...}> } /> - } /> - } /> } /> } /> } /> diff --git a/src/components/BlogPost.tsx b/src/components/BlogPost.tsx deleted file mode 100644 index 46b011e..0000000 --- a/src/components/BlogPost.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { FC } from 'react'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; -import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; -import { format } from 'date-fns'; -import { BlogPost as BlogPostType } from '@/types/blog'; - -interface BlogPostProps { - post: BlogPostType; -} - -const BlogPost: FC = ({ post }) => { - return ( - - - - - {post.author[0]} - -
- {post.title} -

- {format(new Date(post.date), 'MMMM d, yyyy')} -

-
-
- -
- {post.content.map((paragraph, index) => ( -

- {paragraph} -

- ))} -
-
-
- ); -}; - -export default BlogPost; \ No newline at end of file diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 285e7a1..a60291f 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -4,7 +4,6 @@ import { useState } from 'react'; import { cn } from '@/lib/utils'; const navItems = [ - { name: 'Character Blogs', path: '/blogs' }, { name: 'Bride Quiz', path: '/quiz' }, { name: 'Vendors', path: '/vendors' }, { name: 'Success Stories', path: '/success-stories' }, diff --git a/src/components/Routes.tsx b/src/components/Routes.tsx index 5307d5a..e44a941 100644 --- a/src/components/Routes.tsx +++ b/src/components/Routes.tsx @@ -1,7 +1,5 @@ import { Routes as RouterRoutes, Route } from 'react-router-dom'; import Home from '@/pages/Home'; -import Blogs from '@/pages/Blogs'; -import DearJane from '@/pages/DearJane'; import Quiz from '@/pages/Quiz'; import SuccessStories from '@/pages/SuccessStories'; import Analysis from '@/pages/Analysis'; @@ -10,8 +8,6 @@ const Routes = () => { return ( } /> - } /> - } /> } /> } /> } /> diff --git a/src/data/blog-posts.ts b/src/data/blog-posts.ts deleted file mode 100644 index 4dde5c5..0000000 --- a/src/data/blog-posts.ts +++ /dev/null @@ -1,58 +0,0 @@ -export const blogPosts = { - charlotte: [ - { - id: '1', - title: 'The Pragmatic Path to Marriage', - author: 'Charlotte Lucas', - authorImage: '/images/authors/charlotte.jpg', - date: '1813-01-15', - content: [ - 'My dear readers, I must confess that happiness in marriage is entirely a matter of chance. There will always be vexation and grief, and it is better to know as little as possible of the defects of the person with whom you are to pass your life.', - 'I am not romantic, you know. I never was. I ask only a comfortable home; and considering Mr. Collins\'s character, connections, and situation in life, I am convinced that my chance of happiness with him is as fair as most people can boast on entering the marriage state.', - 'Let us be practical in our pursuit of matrimony. A woman must secure her future while she has the power to do so.' - ] - } - ], - marianne: [ - { - id: '2', - title: 'The Heart Must Lead', - author: 'Marianne Dashwood', - authorImage: '/images/authors/marianne.jpg', - date: '1813-03-15', - content: [ - 'To love is to burn, to be on fire! How can one possibly consider marriage without the deepest feelings of love and devotion?', - 'I could not be happy with a man whose taste did not in every point coincide with my own. He must enter into all my feelings; the same books, the same music must charm us both.', - 'Let others speak of prudence and practicality, but I shall never sacrifice the dictates of my heart to the opinions of the world.' - ] - } - ], - fanny: [ - { - id: '3', - title: 'On Principle and Affection', - author: 'Fanny Price', - authorImage: '/images/authors/fanny.jpg', - date: '1814-01-15', - content: [ - 'We must all be guided by our own understanding of what is right. No circumstance should persuade us to act against our principles.', - 'True affection grows slowly, nurtured by shared values and mutual respect. It cannot be forced or rushed by the expectations of others.', - 'In matters of the heart, we must trust our own judgment above all else.' - ] - } - ], - catherine: [ - { - id: '4', - title: 'Romance and Reality', - author: 'Catherine Morland', - authorImage: '/images/authors/catherine.jpg', - date: '1814-02-15', - content: [ - 'How thrilling it is to discover that real life can be just as fascinating as our favorite novels!', - 'Yet we must learn to distinguish between romantic fancy and true character. Not every ancient abbey holds a terrible secret, nor is every charming acquaintance hiding dark mysteries.', - 'The greatest adventures may be found in opening our hearts to genuine friendship and love.' - ] - } - ] -}; diff --git a/src/data/blogPosts.ts b/src/data/blogPosts.ts deleted file mode 100644 index 341487e..0000000 --- a/src/data/blogPosts.ts +++ /dev/null @@ -1,63 +0,0 @@ -export interface BlogPost { - id: number; - title: string; - character: string; - date: string; - content: string; - imageUrl: string; - tags?: string[]; - likes?: number; -} - -export const blogPosts: BlogPost[] = [ - { - id: 1, - title: "The Spirit of Community", - character: "Lewis", - date: "Spring 1", - content: "As mayor of Pelican Town, nothing brings me more joy than seeing our community thrive. Today, our newest farmer arrived, breathing life into old Grandpa's farm. The look of determination in their eyes reminds me of the valley's golden days. Speaking of which, I should remind everyone about the upcoming Egg Festival - Marnie's chickens have been especially productive this year! And please, if anyone sees Pierre, tell him I need to discuss the flower arrangements for the town square...", - imageUrl: "/images/blogs/lewis-blog.png", - tags: ["community", "events", "announcements"], - likes: 156 - }, - { - id: 2, - title: "Tales from the Sea", - character: "Willy", - date: "Spring 15", - content: "The morning mist rolled in thick today, just the way I like it. Found something peculiar in my crab pots - a message in a bottle! Reminded me of my old sailor days... For those interested in fishing, the legend of the Crimsonfish resurfaces every summer. Some say it's just a tale, but I've seen things in these waters that would make a seasoned sailor question everything. Drop by the shop if you want to hear more, or need some quality bait.", - imageUrl: "/images/blogs/willy-blog.png", - tags: ["fishing", "legends", "sea stories"], - likes: 89 - }, - { - id: 3, - title: "Behind the Bar", - character: "Gus", - date: "Summer 1", - content: "Every night at the Stardrop Saloon tells a different story. Yesterday, Pam shared tales of her trucking days while Emily's positive energy kept everyone's spirits high. Shane actually joined a conversation about chicken farming with Marnie - a rare sight indeed! My special spaghetti recipe was a hit again, though I'll never reveal the secret ingredient (sorry, Lewis!). Remember, Fridays mean special discounts on pale ale - locally sourced from our very own farmer!", - imageUrl: "/images/blogs/gus-blog.png", - tags: ["saloon", "recipes", "community"], - likes: 124 - }, - { - id: 4, - title: "Wizard's Musings", - character: "Wizard", - date: "Fall 13", - content: "The veil between realms grows thin as we approach the season of spirits. I've observed unusual activities in the witch's swamp, and the junimos seem more active than ever. For those brave souls interested in the arcane arts, I'm considering hosting a seminar on mushroom identification and their magical properties. Note: Please stop asking about love potions - they're strictly forbidden and highly unstable...", - imageUrl: "/images/blogs/wizard-blog.png", - tags: ["magic", "junimos", "mystical"], - likes: 201 - }, - { - id: 5, - title: "Adventures in Mining", - character: "Clint", - date: "Winter 8", - content: "Found an extraordinary geode yesterday - the crystalline structure unlike anything I've seen before. If you're planning to explore the mines, remember to bring your sword and plenty of torches. I'm offering a special discount on tool upgrades this week. And no, I haven't worked up the courage to... well, never mind. Just come by the shop if you need anything forged.", - imageUrl: "/images/blogs/clint-blog.png", - tags: ["mining", "blacksmith", "tools"], - likes: 67 - } -]; diff --git a/src/pages/BlogPost/BlogPost.tsx b/src/pages/BlogPost/BlogPost.tsx deleted file mode 100644 index 129f9ba..0000000 --- a/src/pages/BlogPost/BlogPost.tsx +++ /dev/null @@ -1,104 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import { useParams, Link, useNavigate } from 'react-router-dom'; -import { BlogPost as BlogPostType, blogPosts } from '../../data/blogPosts'; -import { LoadingSpinner } from '../../components/LoadingSpinner'; -import { ShareButtons } from '../../components/ShareButtons'; -import { CommentSection } from '../../components/CommentSection'; - -const BlogPost: React.FC = () => { - const { id } = useParams<{ id: string }>(); - const navigate = useNavigate(); - const [post, setPost] = useState(null); - const [isLoading, setIsLoading] = useState(true); - - useEffect(() => { - const loadPost = async () => { - try { - setIsLoading(true); - // Simulate API call - await new Promise(resolve => setTimeout(resolve, 500)); - const foundPost = blogPosts.find(p => p.id === Number(id)); - if (!foundPost) { - navigate('/blogs'); - return; - } - setPost(foundPost); - } finally { - setIsLoading(false); - } - }; - - loadPost(); - }, [id, navigate]); - - if (isLoading) return ; - if (!post) return null; - - return ( -
-
- - - - - Back to Blogs - - -
- {`${post.character}'s -

- {post.title} -

-
- By {post.character} - - {post.date} - {post.tags && ( - <> - -
- {post.tags.map(tag => ( - - {tag} - - ))} -
- - )} -
-
- -
-

{post.content}

-
- -
- - -
-
-
- ); -}; - -export default BlogPost; diff --git a/src/pages/Blogs.tsx b/src/pages/Blogs.tsx deleted file mode 100644 index a06de6f..0000000 --- a/src/pages/Blogs.tsx +++ /dev/null @@ -1,201 +0,0 @@ -import React, { useState, useMemo } from 'react'; -import { Link } from 'react-router-dom'; -import { blogPosts, BlogPost } from '../data/blogPosts'; -import { Pagination } from '../components/Pagination'; - -const POSTS_PER_PAGE = 6; - -const BlogCard: React.FC = ({ - id, - title, - character, - date, - content, - imageUrl, - tags, - likes, -}) => { - return ( -
- {`${character}'s -
-

{title}

-
- By {character} - • {date} -
-

{content}

- {tags && ( -
- {tags.map(tag => ( - - {tag} - - ))} -
- )} -
- - Read more - - - - - {likes !== undefined && ( -
- - - - {likes} -
- )} -
-
-
- ); -}; - -const Blogs: React.FC = () => { - const [searchTerm, setSearchTerm] = useState(''); - const [selectedCharacter, setSelectedCharacter] = useState(''); - const [selectedTag, setSelectedTag] = useState(''); - const [currentPage, setCurrentPage] = useState(1); - - const characters = useMemo(() => { - return [...new Set(blogPosts.map(post => post.character))]; - }, []); - - const tags = useMemo(() => { - const allTags = blogPosts.flatMap(post => post.tags || []); - return [...new Set(allTags)]; - }, []); - - const filteredPosts = useMemo(() => { - return blogPosts.filter(post => { - const matchesSearch = ( - post.title.toLowerCase().includes(searchTerm.toLowerCase()) || - post.content.toLowerCase().includes(searchTerm.toLowerCase()) - ); - const matchesCharacter = !selectedCharacter || post.character === selectedCharacter; - const matchesTag = !selectedTag || post.tags?.includes(selectedTag); - return matchesSearch && matchesCharacter && matchesTag; - }); - }, [searchTerm, selectedCharacter, selectedTag]); - - const totalPages = Math.ceil(filteredPosts.length / POSTS_PER_PAGE); - const currentPosts = filteredPosts.slice( - (currentPage - 1) * POSTS_PER_PAGE, - currentPage * POSTS_PER_PAGE - ); - - const handleSearch = (e: React.ChangeEvent) => { - setSearchTerm(e.target.value); - setCurrentPage(1); - }; - - const handleCharacterFilter = (e: React.ChangeEvent) => { - setSelectedCharacter(e.target.value); - setCurrentPage(1); - }; - - const handleTagFilter = (e: React.ChangeEvent) => { - setSelectedTag(e.target.value); - setCurrentPage(1); - }; - - return ( -
-
-

- Character Blogs -

- -
-
- - - -
-
- - {currentPosts.length === 0 ? ( -
-

- No blog posts found matching your criteria. -

-
- ) : ( -
- {currentPosts.map(post => ( - - ))} -
- )} - - -
-
- ); -}; - -export default Blogs; diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 772c6bd..008864b 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -1,5 +1,5 @@ import { Link } from 'react-router-dom'; -import { ArrowRight, BookOpen, Users, Heart, PenTool, Calendar, BookMarked } from 'lucide-react'; +import { ArrowRight, BookOpen, Heart, PenTool, Calendar, BookMarked } from 'lucide-react'; const Home = () => { return ( @@ -76,17 +76,6 @@ const Home = () => { -
- -

Character Insights

-

- Meet Austen's memorable characters through their blogs, sharing timeless advice on love and marriage. -

- - Read Blogs - -
-

Success Stories

diff --git a/src/pages/NetworkVisualization.tsx b/src/pages/NetworkVisualization.tsx index 86921c5..58e81ee 100644 --- a/src/pages/NetworkVisualization.tsx +++ b/src/pages/NetworkVisualization.tsx @@ -282,7 +282,7 @@ export default function NetworkVisualization() { pt: 2 }}> - Character Network & Timeline + Character Network diff --git a/src/types/blog.ts b/src/types/blog.ts deleted file mode 100644 index 6ecacb4..0000000 --- a/src/types/blog.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface BlogPost { - id: string; - title: string; - author: string; - authorImage: string; - date: string; - content: string[]; -} \ No newline at end of file diff --git a/src/types/index.ts b/src/types/index.ts index 5eaac2a..c3282d6 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,12 +1,3 @@ -export interface BlogPost { - id: string; - title: string; - author: string; - content: string; - date: string; - category: 'charlotte' | 'marianne'; -} - export interface QuizQuestion { id: string; question: string;