WorksHub
rin0420 / games, tools & bots

SAMPLE / TEMPLATE

News Portal Template

A template reproducing the look and navigation of an ordinary news site with nothing but plain HTML, CSS, and JavaScript. Every article in it is placeholder text, not real reporting.

Why build it?

To try a structure where one template serves both article pages and category listings, switching on a URL query. Adding articles never adds HTML files.

Writing articles

Articles live in SQLite and are written through a CMS that runs locally. Only the data file generated from it is published.

What is in it

Four pages: a top page with a lead story, a grid of recent entries, and a sidebar; an article template; a category listing template; and an about page. The article and category templates read ?id= and ?cat= from the URL and render accordingly.

What is not published

The authoring interface, its local server, and the SQLite database are excluded from the deployment. Only the four static pages and the data file they read are public.

Data handling

The reader-facing pages have no input fields. Nothing is stored or sent anywhere.