On Tuesday, 23 July 2013 at 13:19:12 UTC, Dicebot wrote:
There is nothing here D can't do. Dogfooding ftw.

hell, I've done my own versions of that stuff in D! Though most the similarities are actually coincidence since I've never actually used the Ruby stuff, there are a lot of similarities.

In the perhaps poorly named html.d in my github
https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff


There's a macro expander thing that includes a css and javascript subclass. The javascript one is nothing special, it just adds a foreach macro to it. (Which is btw a text expansion macro, but hey it works for me fixes the biggest annoyance I have with that language.)

The really useful one comes with the expandAndDenest css one which translates stuff like

 .test {
    color: red;
    .bold { font-weight: bold; }
 }

into

 .test { color: red; }
 .test .bold { font-weight: bold; }


and has a bunch of macros you can define and use yourself for stuff like some color manipulation, reuse of declarations, and so on.




Of course, no framework for the site is required here, since you can always just convert the file ahead of time in the makefile and serve plain generated code to the website.

Reply via email to