SPA
This commit is contained in:
parent
c51dd48a73
commit
937b9fb48f
9 changed files with 180 additions and 90 deletions
92
README.md
92
README.md
|
|
@ -1,78 +1,54 @@
|
|||
# catcrafts.net
|
||||
|
||||
A modern, responsive website built with C++ using Crafter.CppDOM and compiled to WebAssembly.
|
||||
This is the source code for catcrafts.net, a website built entirely in C++ using the Crafter.CppDOM library.
|
||||
|
||||
## Features
|
||||
|
||||
- Modern, clean design with gradient colors and smooth animations
|
||||
- Fully responsive layout that works on mobile and desktop
|
||||
- Blog functionality with multiple posts
|
||||
- Smooth navigation and transitions
|
||||
- Semantic HTML structure
|
||||
- Custom CSS with modern styling techniques
|
||||
- **Responsive Design**: Works on all device sizes
|
||||
- **Modern UI**: Clean and contemporary design with smooth animations
|
||||
- **Blog System**:
|
||||
- Blog posts displayed with previews on the main blog page
|
||||
- Individual blog post pages with full content
|
||||
- Navigation between posts
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
catcrafts.net/
|
||||
├── interfaces/ # Interface definitions
|
||||
│ ├── Catcrafts.cppm
|
||||
│ ├── Catcrafts-Views.cppm
|
||||
│ ├── Catcrafts-Component.cppm
|
||||
│ └── Catcrafts-Blog.cppm
|
||||
├── implementations/ # Implementation files
|
||||
│ ├── Catcrafts-Blog.cpp
|
||||
│ └── main.cpp
|
||||
├── styles.css # Modern CSS styling
|
||||
├── project.json # Build configuration
|
||||
├── run.sh # Development server script
|
||||
└── build.sh # Build script
|
||||
project.json - Build configuration
|
||||
interfaces/ - Interface definitions
|
||||
implementations/ - Implementation files
|
||||
styles/styles.css - Styling
|
||||
run.sh - Run script
|
||||
README.md - This file
|
||||
LICENSE - License information
|
||||
```
|
||||
|
||||
## Blog Implementation Details
|
||||
|
||||
### Blog Previews
|
||||
On the main `/blog` page, each blog post is displayed with:
|
||||
- Title and date
|
||||
- Preview of the content (first 200 characters)
|
||||
- "Read Full Post" button to view the complete article
|
||||
|
||||
### Individual Blog Pages
|
||||
Each blog post has its own URL:
|
||||
- `/blog/0` - First blog post
|
||||
- `/blog/1` - Second blog post
|
||||
- And so on...
|
||||
|
||||
When visiting these URLs, users see the complete blog post content.
|
||||
|
||||
## Building and Running
|
||||
|
||||
### Prerequisites
|
||||
- C++ compiler with WebAssembly support
|
||||
- Caddy server for serving files
|
||||
To build and run the project:
|
||||
|
||||
### Quick Start
|
||||
|
||||
1. Make the scripts executable:
|
||||
```bash
|
||||
chmod +x run.sh build.sh
|
||||
```
|
||||
|
||||
2. Run the development server:
|
||||
```bash
|
||||
./run.sh
|
||||
```
|
||||
|
||||
The website will be available at `http://localhost:8085`
|
||||
This will compile the project and serve it locally.
|
||||
|
||||
### Building Manually
|
||||
## Contributing
|
||||
|
||||
```bash
|
||||
./build.sh
|
||||
```
|
||||
|
||||
## Technologies Used
|
||||
|
||||
- **C++**: Core application logic
|
||||
- **Crafter.CppDOM**: DOM manipulation library
|
||||
- **WebAssembly**: Runtime environment
|
||||
- **CSS3**: Modern styling with animations and gradients
|
||||
- **HTML5**: Semantic markup
|
||||
|
||||
## Customization
|
||||
|
||||
To add new blog posts:
|
||||
1. Edit `interfaces/Catcrafts-Blog.cppm`
|
||||
2. Add new entries to the `posts` vector
|
||||
|
||||
To modify styling:
|
||||
1. Edit `styles.css`
|
||||
2. Adjust colors, fonts, and layout as needed
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License - see the LICENSE file for details.
|
||||
This project is open-source and made available for viewing purposes only. No permission is granted to copy, modify, distribute, or create derivative works.
|
||||
Loading…
Add table
Add a link
Reference in a new issue