demo.tpl 604 B

123456789101112131415161718192021222324252627
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>{{$title}}</title>
  5. <style>
  6. body { font-family: Arial, sans-serif; margin: 40px; }
  7. .box { border: 1px solid #ddd; padding: 20px; margin-bottom: 20px; }
  8. </style>
  9. </head>
  10. <body>
  11. <div class="box">
  12. <h1>{{$title}}</h1>
  13. <p>当前时间: {{$now|date_format:"%Y-%m-%d %H:%M:%S"}}</p>
  14. </div>
  15. <div class="box">
  16. {{if $show_extra}}
  17. <h3>额外信息:</h3>
  18. <ul>
  19. {{foreach $items as $item}}
  20. <li>{{$item@key}}: {{$item}}</li>
  21. {{/foreach}}
  22. </ul>
  23. {{/if}}
  24. </div>
  25. </body>
  26. </html>