filterex.nim 496 B

123456789101112131415161718192021222324
  1. #? stdtmpl | standard
  2. #proc generateHTMLPage(title, currentTab, content: string,
  3. # tabs: openArray[string]): string =
  4. # result = ""
  5. <head><title>$title</title></head>
  6. <body>
  7. <div id="menu">
  8. <ul>
  9. #for tab in items(tabs):
  10. #if currentTab == tab:
  11. <li><a id="selected"
  12. #else:
  13. <li><a
  14. #end if
  15. href="${tab}.html" title = "$title - $tab">$tab</a></li>
  16. #end for
  17. </ul>
  18. </div>
  19. <div id="content">
  20. $content
  21. A dollar: $$.
  22. </div>
  23. </body>