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.
 
 
 
 

134 lines
5.7 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 site.context.tweet_via %} <meta property="twitter:site:id" content="{{ site.context.tweet_via }}" /> {% endif %}
  32. {% if resource.meta.imagealt %} <meta name="twitter:image:alt" content="{{ resource.meta.imagealt }}" />{% endif %}
  33. {% if resource.meta.twitterlabel1 %} <meta name="twitter:label1" content="{{ resource.meta.twitterlabel1 }}" />{% endif %}
  34. {% if resource.meta.twitterlabel2 %} <meta name="twitter:label2" content="{{ resource.meta.twitterlabel2 }}" />{% endif %}
  35. {% if resource.meta.twitterdata1 %} <meta name="twitter:data1" content="{{ resource.meta.twitterdata1 }}" />{% endif %}
  36. {% if resource.meta.twitterdata2 %} <meta name="twitter:data2" content="{{ resource.meta.twitterdata2 }}" />{% endif %}
  37. <title>{% block title %}{{ resource.meta.title }}{% endblock %}</title>
  38. <meta name="description" content="{{ resource.meta.description }}">
  39. <meta name="author" content="{{ resource.meta.author }}">
  40. <!-- Mobile viewport optimized: j.mp/bplateviewport -->
  41. <meta name="viewport" content="{{ resource.meta.viewport or site.context.viewport }}">
  42. {% block css %}
  43. <link rel="stylesheet" href="{{ media_url('css/w3.css') }}">
  44. <link rel="stylesheet" href="{{ media_url('css/tufte.css') }}">
  45. <link rel="stylesheet" href="{{ media_url('css/custom.css') }}">
  46. {% endblock css %}
  47. {% block endhead %}{% endblock endhead %}
  48. </head>
  49. <body class="w3-main" id="{{ slug(resource) }}">
  50. <!-- from: https://www.w3schools.com/w3css/w3css_sidebar.asp -->
  51. <div class="w3-top">
  52. <div class="w3-bar w3-lightgrey">
  53. <button class="w3-bar-item w3-button w3-xlarge w3-right" onclick="w3_open()">&#9776;</button>
  54. </div>
  55. </div>
  56. <div class="w3-sidebar w3-animate-right w3-bar-block w3-collapse" id="mySidebar">
  57. <button class="w3-bar-item w3-button" onclick="w3_close()"><b>Close</b> &times;</button>
  58. {% set hierarchy = node.rwalk()|list %}
  59. {% for yeargrp in hierarchy[-1].walk_resources_sorted_by_time()|groupby("meta.created.year")|reverse %}
  60. <div class="w3-dropdown-hover w3-dropdown-click">
  61. <button class="w3-button"><b>{{ yeargrp.grouper }}</b> ({{ yeargrp.list|count }}){# font awesome <i class="fa fa-caret-down"></i> #}</button>
  62. <div class="w3-dropdown-content w3-bar-block">
  63. {% for monthgrp in yeargrp.list|groupby("meta.created.month")|reverse %}
  64. <b><button class="w3-button">{{ monthgrp.list[0].meta.created|date_format('%B') }}{# font awesome <i class="fa fa-caret-down"></i> #}</button></b>
  65. {% for item in monthgrp.list %}
  66. <div class="w3-dropdown-click w3-bar-block" style="margin-left: 0.75em;">
  67. <a href="{{ content_url(item.url) }}" class="no-tufte-underline w3-bar-item w3-button">{{ item.meta.title }}</a>
  68. </div>
  69. {% endfor %}
  70. {% endfor %}
  71. </div>
  72. </div>
  73. {% endfor %}
  74. </div>
  75. {% block content %}
  76. <div class="site" id="main" role="main">
  77. {% block container %}
  78. <header class="banner clearfix title">
  79. {% block header -%}
  80. <h1><a class="no-tufte-underline" href="{{ content_url('/') }}">{{ site.context.title }}</a></h1>
  81. {%- endblock %}
  82. </header>
  83. {% block main %}
  84. {% endblock main %}
  85. {% endblock container %}
  86. <footer>
  87. <div class="footer">
  88. <div class="contact">
  89. <ul class="tags">
  90. <li><a href="https://twitter.com/{{ site.context.tweet_via }}">Twitter</a></li>
  91. </ul>
  92. </div>
  93. </div>
  94. </footer>
  95. </div>
  96. {% endblock content%}
  97. {% block js %}
  98. <!-- Javascript at the bottom for fast page loading -->
  99. {% block scripts %}
  100. {% endblock scripts %}
  101. <script>
  102. /* incase there is no JS, always make it visible */
  103. document.getElementById("mySidebar").style.display = "none";
  104. function w3_open() {
  105. document.getElementById("mySidebar").style.display = "block";
  106. }
  107. function w3_close() {
  108. document.getElementById("mySidebar").style.display = "none";
  109. }
  110. </script>
  111. <!--[if lt IE 7 ]>
  112. <script src="js/libs/dd_belatedpng.js"></script>
  113. <script>DD_belatedPNG.fix('img, .png_bg'); // Fix any <img> or .png_bg bg-images. Also, please read goo.gl/mZiyb </script>
  114. <![endif]-->
  115. {% endblock js %}
  116. </body>
  117. </html>