base.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!DOCTYPE html5>
  2. <html>
  3. <head>
  4. {% load static %}
  5. <title>{{title}}</title>
  6. <meta http-equiv="content-type" content="text/html; charset=utf-8">
  7. <meta name="viewport" content="width=device-width, initial-scale=1">
  8. {% block jquery %}
  9. <script src="/static/js/jquery.js"></script>
  10. {% endblock %}
  11. {% block bootstrap %}
  12. <link rel="stylesheet" type="text/css" href="{% static 'bootstrap/css/bootstrap.css' %}" />
  13. <script src="/static/bootstrap/js/bootstrap.js"></script>
  14. <link rel="stylesheet" type="text/css" href="{% static 'bootstrap-tags/css/bootstrap-tags.css' %}" />
  15. <script src="/static/bootstrap-tags/js/bootstrap-tags.js"></script>
  16. {% endblock %}
  17. {% block defaultcss %}
  18. <link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}" />
  19. {% endblock %}
  20. {% block extrahead %}
  21. {% endblock %}
  22. </head>
  23. <body>
  24. <div class="container-fluid">
  25. {% block header %}
  26. <h1>{% if title %}{{title}}{% else %}untitled{% endif %}</h1>
  27. {% endblock %}
  28. </div>
  29. <div class="container-fluid">
  30. <div class="row">
  31. <div id="sidenav" class="col-sm-2 sidenav">
  32. {% block nav %}
  33. <ul class="nav nav-pills nav-stacked">
  34. <li><a href="{% url "media_list" %}">Index</a></li>
  35. {% if request.user.is_authenticated %}
  36. <li><a href="{% url "media_new" %}">Upload</a></li>
  37. {% else %}
  38. <li><a href="/accounts/login">Log in</a></li>
  39. {% endif %}
  40. </ul>
  41. <form action="/media/search" method="GET">
  42. <div class="input-group">
  43. <input type="text" name="q" class="form-control" placeholder="Search videos">
  44. <span class="input-group-btn">
  45. <button class="btn btn-default" type="button">🔍</button>
  46. </span>
  47. </div>
  48. </form>
  49. {% endblock %}
  50. </div>
  51. <div id="content" class="col-sm-10">
  52. {% block content %}No content.{% endblock %}
  53. </div>
  54. </div>
  55. </div>
  56. <footer class="container-fluid">
  57. <p>All material uploaded is licensed Creative Commons Attribution-Share Alike.</p>
  58. </footer>
  59. </body>
  60. </html>