# Blynex WordPress Block Theme

## Overview

Blynex is a modern WordPress Block Theme designed to provide a flexible and customizable experience for both site administrators and content creators. Built with the latest WordPress block editor (Gutenberg) features, Blynex offers a clean, responsive design with enhanced functionality for block-based content creation.

## Features

- **Custom Block Styles**: Includes theme-specific variations for core blocks
- **Hover Effects**: Built-in support for interactive hover effects on blocks
- **Post Format Support**: Enhanced display for various post formats (aside, audio, chat, gallery, image, link, quote, status, video)
- **Custom Block Attributes**: Extends block functionality with theme-specific attributes
- **Pattern Categories**: Organized block patterns for pages and post formats
- **Dynamic Content**: Block bindings for dynamic content display

## Theme Structure

```
blynex/
├── assets/              # Static assets (images, fonts, etc.)
├── build/               # Compiled assets
├── includes/            # PHP classes and functions
│   ├── class-loader.php        # Theme initialization and setup
│   ├── class-enqueue.php       # Asset loading management
│   ├── class-attributes.php    # Custom block attributes
│   ├── block-styles.php        # Custom block styles
│   └── features/               # Feature-specific functionality
├── languages/           # Translation files
├── patterns/            # Block patterns
├── parts/               # Block template parts
├── src/                 # Source JavaScript files
│   ├── index.js                # Main JavaScript entry point
│   └── features/               # JavaScript feature modules
├── templates/           # Block templates
├── functions.php        # Theme functions
├── index.php            # Main template file
├── style.css            # Main stylesheet
└── theme.json           # Theme configuration
```

## Core Components

### Theme Initialization (`class-loader.php`)

The `Blynex_Theme` class serves as the main controller for theme initialization. It:
- Implements the singleton pattern to ensure a single instance
- Loads required includes and dependencies
- Sets up WordPress hooks and filters
- Registers block bindings and pattern categories
- Initializes theme support features

### Asset Management (`class-enqueue.php`)

The `Blynex_Block_Assets` class handles:
- Registration and enqueuing of theme styles
- Loading of editor-specific scripts
- Conditional loading based on context (admin vs. frontend)
- Version control for cache busting

### Block Attributes (`class-attributes.php`)

The `Blynex_Block_Attributes` class manages:
- Custom block attributes processing
- HTML tag manipulation
- Style merging and application
- Integration with hover effects

### Block Styles (`block-styles.php`)

Provides theme-specific block style variations:
- Custom list styles (e.g., checkmark list)
- Inline CSS definitions
- Style registration with WordPress

## JavaScript Features

The theme includes several JavaScript modules:
- Element hide functionality for the editor
- Hover effect implementation
- Block-specific enhancements

## Usage

### Installation

1. Download the theme
2. Upload to your WordPress installation
3. Activate through the WordPress admin panel

### Customization

#### Block Styles

The theme includes custom block styles that can be applied through the block editor:
- Checkmark List: A styled list with custom checkmark bullets

#### Hover Effects

Blocks can be enhanced with hover effects through custom attributes:
- Zoom
- Grayscale
- Fade
- Blur
- Glow

#### Block Patterns

The theme provides organized pattern categories:
- Pages: Full page layouts
- Post Formats: Format-specific patterns

## Development

### Building Assets

The theme uses a build process for JavaScript and CSS:
1. Source files are in the `src` directory
2. Compiled assets are output to the `build` directory
3. Use appropriate build tools to compile assets

### Adding Custom Block Styles

To add new block styles:
1. Edit `includes/block-styles.php`
2. Add new style registration using `register_block_style()`
3. Define inline CSS for the style

### Extending Block Attributes

To add new block attributes:
1. Modify `includes/class-attributes.php`
2. Add attribute processing logic
3. Update the HTML tag processor implementation

## Requirements

- WordPress 6.0 or higher
- PHP 7.4 or higher
- Modern web browser with JavaScript enabled

## License

This theme is licensed under the GPL v2 or later.

## Credits

- Built with WordPress Block Editor
- Uses modern web development practices
- Follows WordPress coding standards 