main.tpl 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. % rebase('base.tpl')
  2. %#template to generate a HTML table from a list of tuples (or list of lists, or tuple of tuples or ...)
  3. <div class="header-container">
  4. <header class="wrapper clearfix">
  5. <h1 class="title">Pwman Web</h1>
  6. <nav>
  7. <ul>
  8. <li><a href="#">nav ul li a</a></li>
  9. <li><a href="#">nav ul li a</a></li>
  10. <li><a href="#">nav ul li a</a></li>
  11. </ul>
  12. </nav>
  13. </header>
  14. </div>
  15. <div class="main-container">
  16. <div class="main wrapper clearfix">
  17. <aside>
  18. <h3>Select filter</h3>
  19. <form action="/" method="POST">
  20. <select multiple name="tag" onchange="this.form.submit()">
  21. %for tag in tags:
  22. <option value="{{tag}}">{{tag}}</option>
  23. %end
  24. </select>
  25. </form>
  26. </aside>
  27. <article>
  28. <header>
  29. </header>
  30. <h2>Click on a username to view the details:</h2>
  31. <table border="1">
  32. %for node in nodes:
  33. <tr>
  34. <td><a href=/node/{{node._id}}>{{node.username}}@{{node.url}}</a></td>
  35. <td>{{ ', '.join([t.strip() for t in filter(None, node.tags)]) }}</td>
  36. <td><a href=/edit/{{node._id}}>edit</a></td>
  37. </tr>
  38. %end
  39. </table>
  40. </article>
  41. </div> <!-- #main -->
  42. </div> <!-- #main-container -->
  43. <div class="footer-container">
  44. <div class="forget-button">
  45. <form action="/forget" method="POST">
  46. <input type="submit" value="Forget password">
  47. </form>
  48. </div>
  49. </div>
  50. <script src="static/js/vendor/jquery-1.11.0.js"></script>
  51. <script src="static/js/plugins.js"></script>
  52. <script src="static/js/main.js"></script>