Taken from a little side project for a client who just wanted a simple website without any heavy requirements, I want to give you the little template engine I created and more importantly the static HTML approach I exercised: Simple Page

First of all, feel free to look into the demo.

demo-image

Often I find myself annoyed by a website using tons of scripts, animation, ads and external assets. Especially when having security concerns visiting a static site is quite pleasant surprise. That’s why I try to stay away from JavaScript as much as I can. My approach consists of using CSS for instant page turns and PHP for the template and i18n. Cookies are disabled, but a session can be maintained by the PHPSESSID URL argument; although this is not recommended.

To keep things simple, I didn’t implement nested templates or any logic, like iterations. That way the whole HTML template could fit into one file and the template engine stays rudimentary. Furthermore I wanted to avoid email interaction, for now. That’s why logging to a text file should be a good enough start.

Features

  • static website for simple, multiple pages
  • no JavaScript, no reloading assets, no cookies, no dynamics
  • optimized style for all display sizes
  • custom form input styles

And when using PHP:

  • user inputs are stored into a local text file
  • security token when sending data to fight bots/spam
  • i18n - see the “/languages” directory

If you are interested in the static page file, please just use the save feature of your browser.