The blog.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

133 lines
5.6 KiB

  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 (gte IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
  5. <head>
  6. {% block starthead %}{% endblock starthead %}
  7. <meta charset="{{ resource.meta.charset }}">
  8. <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
  9. Remove this if you use the .htaccess -->
  10. <meta http-equiv="X-UA-Compatible" content="{{ resource.meta.compatibility }}">
  11. <!-- encoding must be specified within the first 512 bytes
  12. www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset -->
  13. <!-- meta element for compatibility mode needs to be before
  14. all elements except title & meta
  15. msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx -->
  16. <!-- Chrome Frame is only invoked if meta element for
  17. compatibility mode is within the first 1K bytes
  18. code.google.com/p/chromium/issues/detail?id=23003 -->
  19. <!-- automatically refresh, add/remove closing comment to enable/disable
  20. <meta http-equiv="refresh" content="2">
  21. <!-- end comment for above refresh -->
  22. <!-- Twitter cards, OpenGraph and Slack unfurling -->
  23. <meta name="twitter:card" content="summary" />
  24. {% if resource.meta.twittertitle %}
  25. <meta property="og:title" content="{{ resource.meta.twittertitle }}" />
  26. {% else %}
  27. <meta property="og:title" content="{{ resource.meta.title }}" />
  28. {% endif %}
  29. <meta property="og:description" content="{{ resource.meta.description }}" />
  30. {% if resource.meta.image %} <meta property="og:image" content="{{ resource.meta.image }}" />{% endif %}
  31. {% if resource.meta.imagealt %} <meta name="twitter:image:alt" content="{{ resource.meta.imagealt }}" />{% endif %}
  32. {% if resource.meta.twitterlabel1 %} <meta name="twitter:label1" content="{{ resource.meta.twitterlabel1 }}" />{% endif %}
  33. {% if resource.meta.twitterlabel2 %} <meta name="twitter:label2" content="{{ resource.meta.twitterlabel2 }}" />{% endif %}
  34. {% if resource.meta.twitterdata1 %} <meta name="twitter:data1" content="{{ resource.meta.twitterdata1 }}" />{% endif %}
  35. {% if resource.meta.twitterdata2 %} <meta name="twitter:data2" content="{{ resource.meta.twitterdata2 }}" />{% endif %}
  36. <title>{% block title %}{{ resource.meta.title }}{% endblock %}</title>
  37. <meta name="description" content="{{ resource.meta.description }}">
  38. <meta name="author" content="{{ resource.meta.author }}">
  39. <!-- Mobile viewport optimized: j.mp/bplateviewport -->
  40. <meta name="viewport" content="{{ resource.meta.viewport or site.context.viewport }}">
  41. {% block css %}
  42. <link rel="stylesheet" href="{{ media_url('css/w3.css') }}">
  43. <link rel="stylesheet" href="{{ media_url('css/custom.css') }}">
  44. <link rel="stylesheet" href="{{ media_url('css/tufte.css') }}">
  45. {% endblock css %}
  46. {% block endhead %}{% endblock endhead %}
  47. </head>
  48. <body class="w3-main" id="{{ resource.meta.id if resource.meta.id else resource.slug }}">
  49. <!-- from: https://www.w3schools.com/w3css/w3css_sidebar.asp -->
  50. <div class="w3-top">
  51. <div class="w3-bar w3-lightgrey">
  52. <button class="w3-bar-item w3-button w3-xlarge w3-right" onclick="w3_open()">&#9776;</button>
  53. </div>
  54. </div>
  55. <div class="w3-sidebar w3-animate-right w3-bar-block w3-collapse" style="width:350px;right:0;display:block;" id="mySidebar">
  56. <button class="w3-bar-item w3-button" onclick="w3_close()">Close &times;</button>
  57. {% set hierarchy = node.rwalk()|list %}
  58. {% for yeargrp in hierarchy[-1].walk_resources_sorted_by_time()|groupby("meta.created.year")|reverse %}
  59. <div class="w3-dropdown-hover w3-dropdown-click">
  60. <button class="w3-button">{{ yeargrp.grouper }} ({{ yeargrp.list|count }}){# font awesome <i class="fa fa-caret-down"></i> #}</button>
  61. <div class="w3-dropdown-content w3-bar-block">
  62. {% for monthgrp in yeargrp.list|groupby("meta.created.month")|reverse %}
  63. <button class="w3-button">{{ monthgrp.list[0].meta.created|date_format('%B') }}{# font awesome <i class="fa fa-caret-down"></i> #}</button>
  64. {% for item in monthgrp.list %}
  65. <div class="w3-dropdown-click w3-bar-block" style="margin-left: 0.75em;">
  66. <a href="{{ content_url(item.url) }}" class="no-tufte-underline w3-bar-item w3-button">{{ item.meta.title }}</a>
  67. </div>
  68. {% endfor %}
  69. {% endfor %}
  70. </div>
  71. </div>
  72. {% endfor %}
  73. </div>
  74. {% block content %}
  75. <div class="site" id="main" role="main">
  76. {% block container %}
  77. <header class="banner clearfix title">
  78. {% block header -%}
  79. <h1><a class="no-tufte-underline" href="{{ content_url('/') }}">{{ site.context.title }}</a></h1>
  80. {%- endblock %}
  81. </header>
  82. {% block main %}
  83. {% endblock main %}
  84. {% endblock container %}
  85. <footer>
  86. <div class="footer">
  87. <div class="contact">
  88. <ul class="tags">
  89. <li><a href="https://twitter.com/{{ site.context.tweet_via }}">Twitter</a></li>
  90. </ul>
  91. </div>
  92. </div>
  93. </footer>
  94. </div>
  95. {% endblock content%}
  96. {% block js %}
  97. <!-- Javascript at the bottom for fast page loading -->
  98. {% block scripts %}
  99. {% endblock scripts %}
  100. <script>
  101. /* incase there is no JS, always make it visible */
  102. document.getElementById("mySidebar").style.display = "none";
  103. function w3_open() {
  104. document.getElementById("mySidebar").style.display = "block";
  105. }
  106. function w3_close() {
  107. document.getElementById("mySidebar").style.display = "none";
  108. }
  109. </script>
  110. <!--[if lt IE 7 ]>
  111. <script src="js/libs/dd_belatedpng.js"></script>
  112. <script>DD_belatedPNG.fix('img, .png_bg'); // Fix any <img> or .png_bg bg-images. Also, please read goo.gl/mZiyb </script>
  113. <![endif]-->
  114. {% endblock js %}
  115. </body>
  116. </html>