Skip to content
This repository has been archived by the owner on Aug 30, 2020. It is now read-only.

andrevanzuydam/shapehtml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shapelanguage

Shape Language for HTML generation

The shape language brings a helper library for developers who don't want to fiddle with HTML templates and who want to generate well formed HTML without leaving their favourite language.

The idea will be to have the shape library uniform across all languages so the syntax stays and looks the same.

//PHP Example:

$html = shape ( doctype(), 
            html( 
               head (
                 title ("My New Website")
               ),
               body (
                 $h3 = h3 ("Blah Blah Blah"),
                 $p = p ("If you can see Hello World above then shape is ", b ("working"), " correctly!")
               )
            ) 
          );

//set some properties
$h3->setContent ("Hello World!");
$p->addAttribute ("style", "color:green");

//echo out the html
echo $html;

About

Shape Language for HTML generation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published