# Site Landing Page (HostGator / PHP)

Auto-generates a homepage grid from whatever folders sit next to it — each
project shown with a live scaled-down preview of its own page, its title
and description (pulled straight from that page's `<title>` and
`<meta name="description">` tags if present), and a link that opens it.

Add a new folder with an `index.html` in it, reload the page, done — no
manual list to maintain.

## Uploading to HostGator

Put these two files in the folder that should act as the hub (e.g. your
site root, or a `/projects/` subfolder):

- `index.html`
- `list-projects.php`

Then just create sibling folders for each project, e.g.:

```
/index.html
/list-projects.php
/river-crossing/index.html
/text-compression-lab/index.html
```

Visit the hub folder's URL and every sibling folder with an index page
shows up as a tile automatically, newest-updated first.

## Customizing

Open `list-projects.php` and edit the `$exclude` array at the top to skip
any folders that aren't projects (shared JS/CSS folders, `assets`,
etc. — a few common ones are pre-filled). Folders starting with `.` are
always skipped.

A folder with no `index.html`/`.htm`/`.php` still shows up, labeled

Only folders and standalone `.html`/`.php` pages show as tiles by default. Anything else (`.css`, `.js`, images, `.txt`, etc.) is tucked behind a "$ ls -la" button at the bottom of the page.
"no index page yet," so you'll notice if you forgot to add one.

Only folders and standalone `.html`/`.php` pages show as tiles by default. Anything else (`.css`, `.js`, images, `.txt`, etc.) is tucked behind a "$ ls -la" button at the bottom of the page.

## Files

- `index.html` — the hub page (grid of live-preview tiles).
- `list-projects.php` — scans sibling folders on each request and returns
  their title/description/URL as JSON.

## Troubleshooting

- **"Couldn't reach list-projects.php"** — make sure it's uploaded to the
  exact same folder as `index.html`, and you're viewing the page over
  `http(s)://`, not opening the file locally.
- **A project's preview looks blank/tiny/huge** — the preview assumes a
  roughly 1280×800 desktop layout; unusual page sizes may look off, but
  the link still works.

## What counts as a project vs. a hidden file

- **Shown as a tile:** any subfolder, plus any standalone `.html`, `.htm`,
  or `.php` file sitting directly next to `index.html`.
- **Hidden behind "$ ls -la":** everything else — `.css`, `.js`, images,
  `.txt`, `.md`, etc. Click the button at the bottom of the page to see
  them (name, extension, and file size).
