/hyde/layouts/basic/layout/base.j2

http://github.com/hyde/hyde · Jinja · 101 lines · 88 code · 13 blank · 0 comment · 2 complexity · 7fbcec1a569da3d7819b31e67e62545f MD5 · raw file

  1. <!doctype html>
  2. <!-- https://github.com/paulirish/html5-boilerplate/blob/master/index.html -->
  3. <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
  4. <!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
  5. <!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
  6. <!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
  7. <!--[if (gte IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
  8. <head>
  9. {% block starthead %}{% endblock starthead %}
  10. <meta charset="{{ resource.meta.charset }}">
  11. <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
  12. Remove this if you use the .htaccess -->
  13. <meta http-equiv="X-UA-Compatible" content="{{ resource.meta.compatibility }}">
  14. <!-- encoding must be specified within the first 512 bytes
  15. www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset -->
  16. <!-- meta element for compatibility mode needs to be before
  17. all elements except title & meta
  18. msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx -->
  19. <!-- Chrome Frame is only invoked if meta element for
  20. compatibility mode is within the first 1K bytes
  21. code.google.com/p/chromium/issues/detail?id=23003 -->
  22. <title>{% block title %}{{ resource.meta.title }}{% endblock %}</title>
  23. <meta name="description" content="{{ resource.meta.description }}">
  24. <meta name="author" content="{{ resource.meta.author }}">
  25. <!-- Mobile viewport optimized: j.mp/bplateviewport -->
  26. <meta name="viewport" content="{{ resource.meta.viewport }}">
  27. {% block favicons %}
  28. <!-- Place favicon.ico & apple-touch-icon.png
  29. in the root of your domain and delete these references -->
  30. <link rel="shortcut icon" href="{{ media_url('/images/favicon.ico') }}">
  31. <link rel="apple-touch-icon" href="{{ media_url('/images/apple-touch-icon.png') }}">
  32. {% endblock favicons %}
  33. {% block css %}
  34. <link rel="stylesheet" href="{{ media_url('css/site.css') }}">
  35. <link rel="stylesheet" href="{{ media_url('css/syntax.css') }}">
  36. {% endblock css %}
  37. {% block headjs %}
  38. <!-- All JavaScript at the bottom, except for Modernizr which
  39. enables HTML5 elements & feature detects -->
  40. <script src="{{ media_url('js/libs/modernizr-1.7.min.js') }}"></script>
  41. {% endblock headjs %}
  42. {% block endhead %}{% endblock endhead %}
  43. </head>
  44. <body id="{{ resource.meta.id if resource.meta.id else resource.slug }}">
  45. {% block content %}
  46. <div id="container">
  47. {% block container %}
  48. <div id="main" role="main">
  49. <header class="banner clearfix">
  50. {% block header -%}
  51. <h1>BASIC</h1>
  52. <h3>A hyde website</h3>
  53. {%- endblock %}
  54. {% block nav %}
  55. {% from "macros.j2" import render_nav with context %}
  56. {{ render_nav(menu, 'main_nav') }}
  57. {% endblock %}
  58. </header>
  59. <section class="content">
  60. {% block main %}
  61. {% endblock main %}
  62. </section>
  63. </div>
  64. {% endblock container %}
  65. </div> <!--! end of #container -->
  66. <footer>
  67. Powered by <a href="http://ringce.com/hyde">hyde</a>.
  68. </footer>
  69. {% endblock content%}
  70. {% block js %}
  71. <!-- Javascript at the bottom for fast page loading -->
  72. {% block jquery %}
  73. <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
  74. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
  75. <script>window.jQuery || document.write('<script src="js/libs/jquery-1.5.1.min.js">\x3C/script>')</script>
  76. {% endblock jquery %}
  77. {% block scripts %}
  78. {% endblock scripts %}
  79. <!--[if lt IE 7 ]>
  80. <script src="js/libs/dd_belatedpng.js"></script>
  81. <script>DD_belatedPNG.fix('img, .png_bg'); // Fix any <img> or .png_bg bg-images. Also, please read goo.gl/mZiyb </script>
  82. <![endif]-->
  83. {% block analytics %}
  84. {% include "analytics.j2" %}
  85. {% endblock analytics %}
  86. {% endblock js %}
  87. </body>
  88. </html>