# Pages Foundation Catalog

Complete reference of all available pages in the foundation library.

## Static Pages

### HomePage
Main landing page component with hero section and feature highlights.

```rust
use pages::HomePage;

view! {
    <HomePage 
        site_name="My Website"
        site_description="Welcome to our amazing website"
        hero_content="Build amazing web applications with Rust"
        show_features=true
        show_testimonials=true
    />
}
```

**Props**:
- `site_name?: String` - Website name for branding
- `site_description?: String` - Meta description for SEO
- `hero_content?: String` - Main hero section content
- `show_features?: bool` - Display features section (default: true)
- `show_testimonials?: bool` - Display testimonials (default: false)
- `cta_text?: String` - Call-to-action button text
- `cta_url?: String` - Call-to-action button URL

### AboutPage
About us page with company information, team, and history.

```rust
use pages::AboutPage;

view! {
    <AboutPage 
        company_name="My Company"
        founding_year="2020"
        show_team_section=true
        show_history_section=true
        show_values_section=true
    />
}
```

**Props**:
- `company_name: String` - Company name
- `founding_year?: String` - Year company was founded
- `show_team_section?: bool` - Display team members (default: true)
- `show_history_section?: bool` - Display company history (default: true)
- `show_values_section?: bool` - Display company values (default: true)
- `mission_statement?: String` - Company mission statement
- `vision_statement?: String` - Company vision statement

### ContactPage
Contact information page with forms and location details.

```rust
use pages::ContactPage;

view! {
    <ContactPage 
        show_contact_form=true
        show_location_map=true
        show_office_hours=true
        contact_email="contact@example.com"
        phone_number="+1-555-0123"
    />
}
```

**Props**:
- `show_contact_form?: bool` - Display contact form (default: true)
- `show_location_map?: bool` - Display location map (default: false)
- `show_office_hours?: bool` - Display business hours (default: true)
- `contact_email?: String` - Primary contact email
- `phone_number?: String` - Primary phone number
- `address?: String` - Physical address
- `form_endpoint?: String` - Contact form submission endpoint


### LegalPage
Legal documents page with terms of service and policies.

```rust
use pages::LegalPage;

view! {
    <LegalPage 
        company_name="My Company"
        jurisdiction="United States"
        effective_date="2024-01-01"
        show_table_of_contents=true
    />
}
```

**Props**:
- `company_name: String` - Company name for legal documents
- `jurisdiction?: String` - Legal jurisdiction (default: "United States")
- `effective_date?: String` - Effective date of terms
- `show_table_of_contents?: bool` - Display navigation TOC (default: true)
- `contact_email?: String` - Legal contact email
- `last_updated?: String` - Last update date

### PrivacyPage
Privacy policy page with data handling and cookie policies.

```rust
use pages::PrivacyPage;

view! {
    <PrivacyPage 
        company_name="My Company"
        last_updated="2024-01-01"
        show_cookie_policy=true
        show_gdpr_info=true
        contact_email="privacy@example.com"
    />
}
```

**Props**:
- `company_name: String` - Company name for policy
- `last_updated?: String` - Last policy update date
- `show_cookie_policy?: bool` - Include cookie policy section (default: true)
- `show_gdpr_info?: bool` - Include GDPR compliance info (default: false)
- `contact_email?: String` - Privacy contact email
- `data_controller?: String` - Data controller information

### NotFoundPage
404 error page with navigation aids and search functionality.

```rust
use pages::NotFoundPage;

view! {
    <NotFoundPage 
        title="Page Not Found"
        message="The page you're looking for doesn't exist."
        home_url="/"
        show_search=true
        show_popular_pages=true
    />
}
```

**Props**:
- `title?: String` - Page title (default: "Page Not Found")
- `message?: String` - Error message to display
- `home_url?: String` - URL to homepage (default: "/")
- `show_search?: bool` - Display search functionality (default: false)
- `show_popular_pages?: bool` - Show popular pages links (default: false)
- `custom_suggestions?: Vec<(String, String)>` - Custom page suggestions (title, url)

## Content Pages

### ContentIndexPage
Content listing page with pagination, filtering, and search.

```rust
use pages::content::ContentIndexPage;

view! {
    <ContentIndexPage 
        content_type="blog"
        title="Latest Blog Posts"
        description="Insights and tutorials from our team"
        layout="grid"
        per_page=10
        show_pagination=true
        show_search=true
        show_categories=true
    />
}
```

**Props**:
- `content_type: String` - Type of content to display
- `title?: String` - Page title
- `description?: String` - Page description for SEO
- `layout?: "list" | "grid" | "cards"` - Content display layout (default: "grid")
- `per_page?: usize` - Items per page (default: 10)
- `show_pagination?: bool` - Display pagination controls (default: true)
- `show_search?: bool` - Display search functionality (default: false)
- `show_categories?: bool` - Display category filter (default: false)
- `show_tags?: bool` - Display tag filter (default: false)
- `sort_by?: String` - Default sort order (date, title, popularity)

### UnifiedContentIndexPage
Enhanced content index with advanced filtering and layouts.

```rust
use pages::content::UnifiedContentIndexPage;

view! {
    <UnifiedContentIndexPage 
        content_type="portfolio"
        title="Our Work"
        layout="masonry"
        per_page=12
        enable_infinite_scroll=true
        show_filters=true
        filter_categories=vec!["web", "mobile", "design"]
        custom_sorting=vec![("date", "Newest First"), ("name", "A-Z")]
    />
}
```

**Props**:
- `content_type: String` - Content type identifier
- `title?: String` - Page title
- `description?: String` - Page description
- `layout?: "list" | "grid" | "cards" | "masonry"` - Layout style (default: "grid")
- `per_page?: usize` - Items per page (default: 12)
- `enable_infinite_scroll?: bool` - Enable infinite scrolling (default: false)
- `show_filters?: bool` - Display advanced filters (default: false)
- `filter_categories?: Vec<String>` - Available filter categories
- `custom_sorting?: Vec<(String, String)>` - Custom sort options (value, label)

### ContentCategoryPage
Category-specific content listing with category information.

```rust
use pages::content::ContentCategoryPage;

// URL: /blog/category/:category
view! {
    <ContentCategoryPage 
        content_type="blog"
        // category is extracted from URL params
        show_category_description=true
        show_related_categories=true
        per_page=10
    />
}
```

**Props**:
- `content_type: String` - Content type
- `show_category_description?: bool` - Display category info (default: true)
- `show_related_categories?: bool` - Show related categories (default: false)
- `per_page?: usize` - Items per page (default: 10)
- `layout?: "list" | "grid" | "cards"` - Display layout (default: "grid")

### PostViewerPage
Individual content item display with metadata and navigation.

```rust
use pages::PostViewerPage;

// URL: /blog/post/:slug
view! {
    <PostViewerPage 
        content_type="blog"
        // slug is extracted from URL params
        show_author=true
        show_date=true
        show_tags=true
        show_related_posts=true
        enable_comments=true
        enable_social_sharing=true
    />
}
```

**Props**:
- `content_type: String` - Content type identifier
- `show_author?: bool` - Display author information (default: true)
- `show_date?: bool` - Display publication date (default: true)
- `show_tags?: bool` - Display content tags (default: true)
- `show_related_posts?: bool` - Show related content (default: false)
- `enable_comments?: bool` - Enable commenting system (default: false)
- `enable_social_sharing?: bool` - Social sharing buttons (default: false)
- `show_reading_time?: bool` - Display estimated reading time (default: false)
- `show_table_of_contents?: bool` - Generate TOC from headings (default: false)

## User Pages

### UserPage
User profile and dashboard page with account management.

```rust
use pages::UserPage;

view! {
    <UserPage 
        show_profile_editor=true
        show_activity_feed=true
        show_preferences=true
        show_security_settings=true
    />
}
```

**Props**:
- `show_profile_editor?: bool` - Display profile editing form (default: true)
- `show_activity_feed?: bool` - Display user activity (default: false)
- `show_preferences?: bool` - Display user preferences (default: true)
- `show_security_settings?: bool` - Display security options (default: true)
- `show_subscription_info?: bool` - Display subscription details (default: false)


## Admin Pages

### AdminDashboardPage
Admin control panel with system overview and quick actions.

```rust
use pages::admin::AdminDashboardPage;

view! {
    <AdminDashboardPage 
        show_system_stats=true
        show_recent_activity=true
        show_quick_actions=true
        dashboard_widgets=vec!["users", "content", "analytics"]
    />
}
```

**Props**:
- `show_system_stats?: bool` - Display system statistics (default: true)
- `show_recent_activity?: bool` - Show recent system activity (default: true)
- `show_quick_actions?: bool` - Display quick action buttons (default: true)
- `dashboard_widgets?: Vec<String>` - Widgets to display
- `refresh_interval?: u32` - Auto-refresh interval in seconds

### AdminContentPage
Content management interface with CRUD operations.

```rust
use pages::admin::AdminContentPage;

view! {
    <AdminContentPage 
        content_type="blog"
        show_content_editor=true
        show_media_library=true
        show_publishing_tools=true
        allow_bulk_operations=true
    />
}
```

**Props**:
- `content_type?: String` - Content type to manage (default: "all")
- `show_content_editor?: bool` - Display content editor (default: true)
- `show_media_library?: bool` - Show media management (default: true)
- `show_publishing_tools?: bool` - Publishing controls (default: true)
- `allow_bulk_operations?: bool` - Enable bulk actions (default: false)
- `enable_versioning?: bool` - Content version control (default: false)

### AdminUserPage
User management interface with roles and permissions.

```rust
use pages::admin::AdminUserPage;

view! {
    <AdminUserPage 
        show_user_list=true
        show_role_management=true
        show_permission_editor=true
        enable_user_creation=true
        enable_bulk_actions=true
    />
}
```

**Props**:
- `show_user_list?: bool` - Display user listing (default: true)
- `show_role_management?: bool` - Role management interface (default: true)
- `show_permission_editor?: bool` - Permission editing (default: true)
- `enable_user_creation?: bool` - Allow creating new users (default: false)
- `enable_bulk_actions?: bool` - Bulk user operations (default: false)
- `show_activity_logs?: bool` - Display user activity logs (default: false)

### AdminRolePage
Role and permission management interface.

```rust
use pages::admin::AdminRolePage;

view! {
    <AdminRolePage 
        show_role_list=true
        show_permission_matrix=true
        enable_role_creation=true
        show_role_hierarchy=true
    />
}
```

**Props**:
- `show_role_list?: bool` - Display existing roles (default: true)
- `show_permission_matrix?: bool` - Permission assignment matrix (default: true)
- `enable_role_creation?: bool` - Allow creating new roles (default: false)
- `show_role_hierarchy?: bool` - Display role inheritance (default: true)

## Utility Pages

### ExternalLinkPage
External link redirect page with security warnings and countdown.

```rust
use pages::ExternalLinkPage;

// URL: /external?url=https://example.com
view! {
    <ExternalLinkPage 
        show_warning=true
        redirect_delay=5
        show_countdown=true
        allow_direct_access=false
    />
}
```

**Props**:
- `show_warning?: bool` - Display security warning (default: true)
- `redirect_delay?: u32` - Delay in seconds before redirect (default: 5)
- `show_countdown?: bool` - Display countdown timer (default: true)
- `allow_direct_access?: bool` - Allow skipping countdown (default: false)
- `trusted_domains?: Vec<String>` - Domains that skip warning

## Page Generation System

### PageGenerator
Static page generation utility for build-time optimization.

```rust
use pages::{PageGenerator, PageGenerationConfig};

let config = PageGenerationConfig::builder()
    .content_source("content/")
    .template_directory("templates/")
    .output_directory("generated/")
    .languages(vec!["en", "es", "fr"])
    .content_types(vec!["blog", "docs", "portfolio"])
    .enable_i18n(true)
    .enable_seo(true)
    .build();

let generator = PageGenerator::new(config);
generator.generate_all().await?;
```

### PageTemplate System
Template definitions for consistent page layouts.

```rust
use pages::{PageTemplate, BlogTemplateConfig, DocsTemplateConfig};

// Blog template
let blog_template = PageTemplate::Blog(BlogTemplateConfig {
    show_author: true,
    show_date: true,
    show_tags: true,
    show_related_posts: true,
    enable_comments: true,
    sidebar_position: SidebarPosition::Right,
});

// Documentation template
let docs_template = PageTemplate::Documentation(DocsTemplateConfig {
    show_toc: true,
    show_breadcrumbs: true,
    show_edit_link: true,
    show_last_updated: true,
    navigation_position: NavigationPosition::Left,
});
```

## Unified Page Pattern

Each page type provides both direct and unified implementations:

### Direct Usage
Simple page components with sensible defaults:
```rust
use pages::AboutPage;

view! { <AboutPage /> }
```

### Unified Usage
Configurable components with full control:
```rust
use pages::UnifiedAboutPage;

view! {
    <UnifiedAboutPage
        title="About Our Company"
        subtitle="Learn about our mission and values"
        content_source="content/about.md"
        layout="centered"
        show_team=true
        show_history=true
        custom_sections=vec![
            ("mission", "Our Mission"),
            ("values", "Our Values"),
            ("team", "Meet the Team"),
        ]
    />
}
```

## Page Configuration

### Global Page Configuration
```rust
use pages::{PageConfig, LayoutConfig, SeoConfig};

let page_config = PageConfig::builder()
    .title("Custom Page Title")
    .description("Page description for SEO")
    .keywords(vec!["rust", "web", "leptos"])
    .layout(LayoutConfig {
        sidebar: true,
        breadcrumbs: true,
        table_of_contents: true,
        footer: true,
    })
    .seo(SeoConfig {
        canonical_url: Some("https://example.com/page".to_string()),
        og_image: Some("/images/page-og.jpg".to_string()),
        schema_type: Some("Article".to_string()),
        robots: Some("index,follow".to_string()),
    })
    .build();
```

## Responsive Design Support

All pages include responsive design features:
- Mobile-first responsive layouts
- Touch-friendly navigation
- Adaptive content display
- Performance optimization for mobile
- Progressive web app features

## SEO Features

Built-in SEO optimization for all pages:
- Semantic HTML structure
- Meta tag generation
- Open Graph tags
- Twitter Card support
- JSON-LD structured data
- Sitemap generation
- Canonical URLs

## Accessibility Features

Comprehensive accessibility support:
- ARIA labels and roles
- Keyboard navigation
- Screen reader compatibility
- High contrast support
- Focus management
- Alternative text for images

## Performance Features

Optimized for fast loading:
- Lazy loading for non-critical content
- Image optimization
- Code splitting
- Progressive enhancement
- Service worker caching
- Critical CSS extraction

## Usage Tips

1. **Start Simple**: Use direct page components for standard layouts
2. **Customize Gradually**: Move to unified components for custom needs
3. **Use Page Generation**: Generate static pages for better performance
4. **Configure SEO**: Set appropriate meta tags and structured data
5. **Test Responsively**: Ensure pages work across all device sizes
6. **Monitor Performance**: Use built-in performance optimization features

Each page component is designed to work seamlessly with the Rustelo foundation components and can be easily customized for your specific needs.
