Royal Slide Generator

Real-Time Presentation Slide & Syntax-Highlighted Code Editor

Project Overview

A premium web-based slide generator designed for creating elegant presentation slides with Python code syntax highlighting. The tool features a split-screen editor with real-time preview, allowing users to craft professional slides for educational content, tutorials, or technical presentations.

Key Features

Core Functionality

  • Real-Time Live Preview: Instant visual feedback as you edit slide content
  • Python Syntax Highlighting: Custom JavaScript-based syntax highlighting for Python code
  • Two-Column Layout: Code container on left, description box on right
  • HTML Export: One-click copy of complete, self-contained HTML slide
  • Dynamic Content Scaling: Automatically scales slides to fit viewport while maintaining 1280px fixed width

Content Editing

  • Slide Title Input: Main heading with uppercase styling
  • Code Editor: Multi-line textarea for Python code with monospace font
  • Description Title & Text: Rich text support with HTML formatting
  • Bullet Points: Line-separated list with automatic diamond icon formatting
  • Smart Key-Value Formatting: Auto-formats bullet points with colons (e.g., "Key: Value")

Visual Design

  • Royal Theme: Premium purple-to-sapphire gradient background
  • Gold Accents: Gold (#FFD700) borders, text highlights, and decorative elements
  • Magenta Highlights: Vibrant pink (#F72585) for emphasis and interactive states
  • Hexagon Pattern: SVG-based background pattern for depth
  • Glow Effects: Radial gradient glows in corners for ambiance
  • Custom Scrollbars: Styled scrollbars matching the theme
  • Backdrop Blur: Glass-morphism effect on description box

Syntax Highlighting

  • Strings: Gold color highlighting
  • Comments: Italic gray styling
  • Keywords: Magenta highlighting (for, in, def, class, if, else, etc.)
  • Built-in Functions: Cyan highlighting (print, len, range, type, etc.)
  • HTML Escaping: Secure handling of special characters

User Experience

  • Responsive Design: Adapts to different screen sizes
  • Smooth Animations: CSS transitions on hover and focus states
  • Visual Feedback: Success message when HTML is copied
  • Keyboard-Friendly: Proper focus states and tab navigation
  • Fixed Aspect Ratio: Maintains 1280px width with dynamic height

Technology Stack

Frontend

  • HTML5: Semantic markup structure
  • CSS3: Advanced styling with Flexbox & Grid layouts, CSS Gradients (linear & radial), Custom properties and pseudo-elements, Transitions and transforms, Backdrop filters, Custom scrollbars
  • Vanilla JavaScript: No frameworks, pure JS implementation

External Libraries

  • Google Fonts: Urbanist (300, 400, 600, 700, 900 weights), Space Mono (monospace for code)
  • Font Awesome 6.5.1: Icon library (crown, diamond, checkmark icons)

Architecture

  • Single File Application: Self-contained HTML file with embedded CSS and JS
  • No Build Process: Runs directly in browser without compilation
  • Client-Side Only: No server or backend required

Use Cases

  • Creating educational slides for programming tutorials
  • Generating code documentation slides
  • Building presentation materials for tech talks
  • Creating visual content for online courses
  • Quick prototyping of slide layouts