html5-quick-template
A simple blank HTML5 template for quick rendering., (*1)
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!, (*2)
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
, (*3)
Usage
Please note that the template requires a PHP version 5.3.0 or greater., (*4)
Basic usage
To use the template file, just define some simple variables and include the template:, (*5)
<?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., (*6)
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., (*7)
The template is ready for internationalization and "left-to-right" languages (have a look
at the LN STRINGS
part in the source file)., (*8)
Documentation
You can visualize both lists of definable variables and default settings when browsing the
html5-quick-template.html.php
file directly., (*9)
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., (*10)
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., (*11)
This work is built with the help of the following third-parties:, (*12)
The Markdown version of the template also uses:, (*13)