Expand description
by extinct
A dsl (domain specific language) for writing html. This is NOT an html template. This library focus is on html composability. It uses a FILO stack paradigm.
§usage
use html_stack::Stack ;
fn myhomepage() ->String {
let s = Stack::new() ;
s .put("my homepage") .wrp("title") .wrp("head") ;
s .put("my homepage") .wrp("h1") ;
s .put("Lorem ipsum dolor sit amet, consectetur adipiscing elit.") .wrp("p class=someclass") .add() ;
s .put("Lorem ipsum dolor sit amet, consectetur adipiscing elit.") .wrp("p class='class1 class2'") .add() ;
s .put("") .wrp("img src=/img/image.jpg") .add() ;
s .wrp("body") .add() ;
s .put("") .wrp("script type=module src=/js/main.js") .add() ;
s .wrp("html") ;
return s .doctype() ;