post.html 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. ---
  2. layout: default
  3. ---
  4. <div class="post">
  5. <div class="post-header-container {% if page.cover %}has-cover{% endif %}" {% if page.cover %}style="background-image: url({{ page.cover | prepend: site.baseurl }});"{% endif %}>
  6. <div class="scrim {% if page.cover %}has-cover{% endif %}">
  7. <header class="post-header">
  8. <h1 class="title">{{ page.title }}</h1>
  9. <p class="info">by <strong>{{ page.author }}</strong></p>
  10. </header>
  11. </div>
  12. </div>
  13. <div class="wrapper">
  14. {% unless page.cover %} {% include page_divider.html %} {% endunless %}
  15. <section class="post-meta">
  16. <div class="post-date">{{ page.date | date: "%B %-d, %Y" }}</div>
  17. <div class="post-categories">
  18. {% if page.categories.size > 0 %}in {% for cat in page.categories %}
  19. {% if site.jekyll-archives %}
  20. <a href="{{ site.baseurl }}/category/{{ cat }}">{{ cat | capitalize }}</a>{% if forloop.last == false %}, {% endif %}
  21. {% else %}
  22. <a href="{{ site.baseurl }}/posts/#{{ cat }}">{{ cat | capitalize }}</a>{% if forloop.last == false %}, {% endif %}
  23. {% endif %}
  24. {% endfor %}{% endif %}
  25. </div>
  26. </section>
  27. <article class="post-content">
  28. {{ content }}
  29. </article>
  30. {% if site.jekyll-archives %}
  31. {% if page.tags.size > 0 %}
  32. <section class="tags">
  33. <strong>Tags:</strong> {% for tag in page.tags %}<a href="{{ site.baseurl }}/tag/{{ tag }}">{{ tag }}</a>{% if forloop.last == false %},&nbsp;{% endif %}{% endfor %}
  34. </section>
  35. {% endif %}
  36. {% endif %}
  37. <section class="rss">
  38. <p class="rss-subscribe text"><strong>Subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></strong></p>
  39. </section>
  40. <section class="share">
  41. <span>Share: </span>
  42. {% for social in site.social %}
  43. {% capture full_url %}{{ site.url }}{{ site.baseurl }}{{ page.url }}{% endcapture %}
  44. {% if social.name == "Twitter" and social.share == true %}
  45. <a href="//twitter.com/share?text={{ page.title | cgi_escape }}&url={{ full_url | cgi_escape}}&via={{social.username}}"
  46. onclick="window.open(this.href, '{{ social.icon }}-share', 'width=550,height=255');return false;">
  47. <i class="fa fa-{{ social.icon | remove_first: '-square' }}-square fa-lg"></i>
  48. </a>
  49. {% endif %}
  50. {% if social.name == "Facebook" and social.share == true %}
  51. <a href="//www.facebook.com/sharer.php?t={{ page.title | cgi_escape }}&u={{ full_url | cgi_escape}}"
  52. onclick="window.open(this.href, '{{ social.icon }}-share', 'width=550,height=255');return false;">
  53. <i class="fa fa-{{ social.icon | remove_first: '-square' }}-square fa-lg"></i>
  54. </a>
  55. {% endif %}
  56. {% if social.name == "Google+" and social.share == true %}
  57. <a href="//plus.google.com/share?title={{ page.title | cgi_escape }}&url={{ full_url | cgi_escape}}"
  58. onclick="window.open(this.href, '{{ social.icon }}-share', 'width=550,height=255');return false;">
  59. <i class="fa fa-{{ social.icon | remove_first: '-square' }}-square fa-lg"></i>
  60. </a>
  61. {% endif %}
  62. {% if social.name == "LinkedIn" and social.share == true %}
  63. <a href="//www.linkedin.com/shareArticle?mini=true&url={{ full_url | cgi_escape}}"
  64. onclick="window.open(this.href, '{{ social.icon }}-share', 'width=550,height=255');return false;">
  65. <i class="fa fa-{{ social.icon | remove_first: '-square' }}-square fa-lg"></i>
  66. </a>
  67. {% endif %}
  68. {% if social.name == "Pinterest" and social.share == true %}
  69. <a href="//www.pinterest.com/pin/create/button/?description={{ page.title | cgi_escape }}&url={{ full_url | cgi_escape}}&media={{ site.url }}{% if page.cover %}{{ page.cover | prepend: site.baseurl }}{% elsif site.cover %}{{ site.cover | prepend: site.baseurl }}{% else %}{{ site.logo | prepend: site.baseurl }}{% endif %}"
  70. onclick="window.open(this.href, '{{ social.icon }}-share', 'width=550,height=255');return false;">
  71. <i class="fa fa-{{ social.icon | remove_first: '-square' }}-square fa-lg"></i>
  72. </a>
  73. {% endif %}
  74. {% if social.name == "Reddit" and social.share == true %}
  75. <a href="//www.reddit.com/submit" onclick="window.location = '//www.reddit.com/submit?url=' + encodeURIComponent('{{ full_url }}') + '&title={{page.title}}'; return false">
  76. <i class="fa fa-{{ social.icon | remove_first: '-square' }}-square fa-lg"></i>
  77. </a>
  78. {% endif %}
  79. {% if social.name == "Hacker News" and social.share == true %}
  80. <a href="//news.ycombinator.com/submitlink" onclick="window.location = '//news.ycombinator.com/submitlink?u=' + encodeURIComponent('{{ full_url }}') + '&t={{page.title}}'; return false">
  81. <i class="fa fa-{{ social.icon | remove_first: '-square' }} fa-lg"></i>
  82. </a>
  83. {% endif %}
  84. {% endfor %}
  85. </section>
  86. {% if site.inter_post_navigation == true %}
  87. <section class="post-navigation">
  88. <span class="prev-post">
  89. {% if page.previous.url %}
  90. <a href="{{page.previous.url | prepend: site.baseurl}}">
  91. <span class="fa-stack fa-lg">
  92. <i class="fa fa-square fa-stack-2x"></i>
  93. <i class="fa fa-angle-double-left fa-stack-1x fa-inverse"></i>
  94. </span>
  95. <span class="page-number">{{page.previous.title}}</span>
  96. </a>
  97. {% endif %}
  98. </span>
  99. <span class="next-post">
  100. {% if page.next.url %}
  101. <a href="{{page.next.url | prepend: site.baseurl}}">
  102. <span class="page-number">{{page.next.title}}</span>
  103. <span class="fa-stack fa-lg">
  104. <i class="fa fa-square fa-stack-2x"></i>
  105. <i class="fa fa-angle-double-right fa-stack-1x fa-inverse"></i>
  106. </span>
  107. </a>
  108. {% endif %}
  109. </span>
  110. </section>
  111. {% endif %}
  112. {% if site.disqus_shortname %}
  113. {% unless page.disqus_disabled %}
  114. <section class="disqus">
  115. <div id="disqus_thread"></div>
  116. <script type="text/javascript">
  117. // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
  118. var disqus_shortname = '{{ site.disqus_shortname }}';
  119. /* * * DON'T EDIT BELOW THIS LINE * * */
  120. (function() {
  121. var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
  122. dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
  123. (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  124. })();
  125. // @license-end
  126. </script>
  127. <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
  128. <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
  129. </section>
  130. {% endunless %}
  131. {% endif %}
  132. </div>
  133. </div>