Skip to content
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.

elrzn/duplo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

duplo

Duplo generates html.

Examples

Whirlwind

html_(
  head_(
    title_('This is an example')),
  body_(
    h1_('Hello, World!'),
    div_({class => 'container', style => 'border: 1px black solid;'},
      ul_({style => 'list-style-type: circle;'},
        map { li_ 'Number is: ', $_ } 1 .. 5),
      img_({src => 'image.jpg', alt => 'An image'}),
      p_("That's all folks!"))));

Templates

sub template {
  my $title = shift;
  html_(
    head_(
      title_($title_)),
    body_(
      @_,
      div_({class => 'footer'},
        p_("That's all folks!"))))
}

template('Template example',
  h1_('Hello, World!'),
  div_(
    h2_('Oh hai!')));

Releases

No releases published

Packages

No packages published

Languages