CL-WHO-like HTML templating for other languages?

前端 未结 9 1073
别那么骄傲
别那么骄傲 2020-12-10 04:44

Common Lisp guys have their CL-WHO, which makes HTML templating integrated with the \"main\" language thus making the task easier. For those who don\'t know CL-WHO, it looks

9条回答
  •  半阙折子戏
    2020-12-10 05:30

    One of The Perl Foundation's current grant-sponsored projects (a lightweight web framework for Perl 6) has working Perl6 code that provides a similar interface:

    use Tags;
    say show {
        html {
            head { title { 'Tags Demo' } }
            body {
                outs "hi";
                ul :id {
                    outs "A list from one to ten:";
                    for 1..10 {
                        li :class, { $_ }
                    }
                }
            }
        }
    }
    

    Browse or clone the current code on github.

提交回复
热议问题