Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 2.75 KB

File metadata and controls

61 lines (41 loc) · 2.75 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Retro Dynart is a nostalgic website recreating the late 1990s/early 2000s internet aesthetic. Vanilla PHP, no dependencies, no build system, no framework.

Target Browsers

  • Netscape Navigator 4.04
  • Internet Explorer 3.0

All HTML, CSS, and JavaScript must be compatible with these browsers. Do NOT use modern APIs, CSS, or HTML5 features.

Testing Workflow

  1. Quick check: XAMPP Apache serves the site at http://localhost/retro.dynart.net — use a modern browser to catch obvious errors first
  2. Real test: Copy changes to the production server (http://retro.dynart.net), then test with actual Netscape 4.04 / IE 3.0 running in DOSBox-X

Only the user can perform step 2. There is no automated test suite.

Architecture

Template pattern using output buffering:

Each page follows this flow:

  1. include 'config.php' — loads shared font variables and sets charset header
  2. ob_start() — begin capturing HTML output
  3. Page-specific HTML content
  4. $content = ob_get_clean() — capture into $content
  5. Set $title, $description, and optionally $script (for page JS)
  6. include "layout.php" — master layout injects these variables

For pages with JavaScript, use a second ob_start()/ob_get_clean() pair to capture the $script block (see puzzle.php).

Puzzle game MVC-like pattern:

The puzzle game uses a clean separation of concerns:

  • puzzle/puzzle.php — game logic, state management, and render function orchestration
  • puzzle/views/*.php — HTML templates with embedded PHP (<?= ?> syntax, no echo statements)
  • Render functions prepare variables and include their corresponding view templates
  • Templates have access to all needed variables via scope

Visitor counter:

Classic 90s-style visitor counter on landing page only:

  • File-based counter (counter.txt) incremented only on index.php visits
  • Display using individual digit images (images/digit0-9.gif)
  • getCounterDigits($number) function in config.php formats as 6-digit padded display

Coding Conventions

  • Encoding: ISO-8859-1 (not UTF-8), set in config.php header
  • HTML style: Intentionally retro — <font> tags, <table> layout, deprecated body attributes (bgcolor, alink, vlink), <center>, border="0"
  • No CSS files: All styling via HTML attributes
  • Font attributes: Use $fontFace and $fontFaceWoSize from config.php
  • Fixed width: 620px total, 164px sidebar, 456px content
  • JavaScript: Vanilla JS only, IE/Netscape compat patterns (browser detection via navigator.userAgent)

Do NOT modernize the HTML/CSS unless explicitly asked. The retro aesthetic is intentional.