/hyde/layouts/starter/layout/base.j2

http://github.com/hyde/hyde · Jinja · 45 lines · 30 code · 1 blank · 14 comment · 4 complexity · 527d526ae50294753227c3c71a053659 MD5 · raw file

  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <link href="http://fonts.googleapis.com/css?family=Anton"
  5. rel="stylesheet" type="text/css">
  6. <title>Hyde Starter Kit {% if resource.meta.title-%}
  7. | {{ resource.meta.title}}{%-endif %}</title>
  8. <meta charset="utf-8" />
  9. <link rel="stylesheet" href="{{ media_url('css/style.css') }}">
  10. </head>
  11. <body>
  12. <header>
  13. <h1><span>Hyde</span> Starter Kit</h1>
  14. <p>Know your tool</p>
  15. </header>
  16. <nav>
  17. {# Move main menu rendering away from the base layout. This
  18. way it can be used to generate the list many times, e.g. in
  19. a footer, etc.
  20. #}
  21. {% import "macros.j2" as macros with context %}
  22. {{ macros.render_basic_menu() }}
  23. {{ macros.render_advanced_menu() }}
  24. </nav>
  25. <article id="content">
  26. {# Main content block. Notice it has to pass through the
  27. Markdown filter to generate HTML. If a block in content
  28. pages contains only markup, you can omit the filter.
  29. #}
  30. {% filter markdown -%}
  31. {% block content %}{% endblock %}
  32. {%- endfilter %}
  33. </article>
  34. {# Some parts of the web are not needed for development and can
  35. wait for production (e.g. analytics). They can be included in
  36. the final production build. Create a new config file, extend
  37. the original one and override the "mode" property; then build
  38. the site with the new "production configuration".
  39. #}
  40. {% if site.config.mode == "production" -%}
  41. {% include "ga.j2" %}
  42. {%- endif %}
  43. </body>
  44. </html>