piwi/html5-quick-template

This package is abandoned and no longer maintained. The author suggests using the picas/html5-quick-template package instead.

A simple blank HTML5 template for quick rendering.

v1.2.8 2015-12-07 19:31 UTC

This package is not auto-updated.

Last update: 2019-02-20 18:16:57 UTC


README

A simple blank HTML5 template for quick rendering.

Have you ever wanted to quickly test a content with a more fun rendering than the default one of your browser? This single-file and easy-to-use template is just what you need!

Key features

  • template built with Bootstrap, jQuery and Font Awesome
  • inclusion of libraries from a CDN (no local requirements)
  • default Bootstrap layout: fixed navbar on top and responsive page
  • printers friendly
  • search in page with highlight and count of results (3 chars. min)
  • use TAB key to select search field and ESC key to clear current search
  • query string to process a search on document load with search=...
  • simple profiler (hidden by default) visible on document load with query argument profiler=on

Alt text

Usage

Please note that the template requires a PHP version 5.3.0 or greater.

Basic usage

To use the template file, just define some simple variables and include the template:

<?php

// page title
$title = 'Test title';

// page content
$content = <<<eot
Etiam accumsan metus at diam vehicula, at blandit ligula laoreet.
Donec tempus leo sit amet sodales eleifend. Cras sollicitudin eros a nisl aliquet,
vitae congue odio elementum. Nullam hendrerit fringilla porttitor.
eot;

// include the template
require '/path/to/html5-quick-template.html.php';

?>

Please see the source of the test.php file for a full example. The complete list of variables to be (eventually) defined can be found in the USER VARIABLES part of the html5-quick-template.html.php source file.

Advanced usage

You can overload internal settings defining a $settings array in your script, with all default settings entries or part of them. Please see the SETTINGS part in the html5-quick-template.html.php source file for a full list.

The template is ready for internationalization and "left-to-right" languages (have a look at the LN STRINGS part in the source file).

Documentation

You can visualize both lists of definable variables and default settings when browsing the html5-quick-template.html.php file directly.

Usage for Markdown syntax files

A special version of the template is built to handle and render rich HTML (using the template itself) for Markdown syntax contents with direct handling by the Apache web-server. See the mde-master branch of the repository or use a xxx-mde release tag.

Author, license & contributions

This (small) work is authored and maintained by @picas and licensed under an Apache 2.0 license. To propose modifications or tell about a bug, please create a ticket or a fork of the sources repository at http://github.com/e-picas/html5-quick-template.

This work is built with the help of the following third-parties:

The Markdown version of the template also uses: